Bestand:MATLABSChartForPairedXBarAndSChart.png
Pagina-inhoud wordt niet ondersteund in andere talen.
Uit Wikibooks
MATLABSChartForPairedXBarAndSChart.png (560 × 420 pixels, bestandsgrootte: 4 kB, MIME-type: image/png)
Dit is een bestand van Wikimedia Commons, een verzameling van vrije inhoud die door de Wikimedia Foundation wordt gehost. Onderstaande beschrijving komt van de beschrijving van het bestand daar. |
Beschrijving
BeschrijvingMATLABSChartForPairedXBarAndSChart.png |
English: A en:MATLAB-generated s en:Control chart for a process that experienced a 1.5σ drift starting at midnight. This chart is paired with an xbar chart to form an en:Xbar and s chart. |
Datum | |
Bron | Eigen werk |
Auteur | DanielPenfield |
Licentie
Ik, de auteursrechthebbende van dit werk, maak het hierbij onder de volgende licentie beschikbaar:
Dit bestand is gelicenseerd onder de Creative Commons-licentie Naamsvermelding-Gelijk delen 3.0 Unported
- De gebruiker mag:
- Delen – het werk kopiëren, verspreiden en doorgeven
- Remixen – afgeleide werken maken
- Onder de volgende voorwaarden:
- naamsvermelding – U moet op een gepaste manier aan naamsvermelding doen, een link naar de licentie geven, en aangeven of er wijzigingen in het werk zijn aangebracht. U mag dit op elke redelijke manier doen, maar niet zodanig dat de indruk wordt gewekt dat de licentiegever instemt met uw werk of uw gebruik van zijn werk.
- Gelijk delen – Als u het werk heeft geremixt, veranderd, of erop heeft voortgebouwd, moet u het gewijzigde materiaal verspreiden onder dezelfde licentie als het oorspronkelijke werk, of een daarmee compatibele licentie.
Source code
en:Perl
#!/usr/bin/perl -w
use strict;
use Math::Random;
my %shiftSchedule = (
"first" => { "start" => 6.00, "end" => 14.00 },
"second" => { "start" => 14.00, "end" => 22.00 },
"third" => { "start" => 22.00, "end" => 6.00 }
);
my $shift = "third"; # shift to monitor
my $inspectionRate = 1 / 2; # every 1/2 hour
my $drift = 1.5; # drift to simulate
my $m = 25; # samples in control chart setup
my $n = 12; # observations per sample
my $target = 100.0; # quality characteristic target
my $hour;
my $i;
my $j;
my $minute;
my $observation;
my $setupM = $m;
#
# simulate control chart setup
#
open(SETUPCSV, ">xs_setup.csv") || die "! can't open \"xs_setup.csv\" ($!)\n";
for ($i = 1; $i <= $m; $i++) {
for ($j = 0; $j < $n; $j++) {
$observation = $target + random_normal();
if ($j > 0) {
print SETUPCSV ",";
}
printf SETUPCSV "%7.3f", $observation;
}
printf SETUPCSV "\r\n";
}
close(SETUPCSV);
#
# simulate control chart monitoring
#
open(MONITORINGCSV, ">xs_monitoring.csv") || die "! can't open \"xs_monitoring.csv\" ($!)\n";
$m = $shiftSchedule{$shift}{"end"} - $shiftSchedule{$shift}{"start"};
if ($m < 0) {
$m += 24;
}
$m /= $inspectionRate;
for ($i = 1; $i <= $m; $i++) {
$hour = int($i * $inspectionRate + $shiftSchedule{$shift}{"start"});
if ($hour >= 24) {
$hour -= 24;
}
$minute = ($i & 0x1) ? (60 * $inspectionRate) : 0;
printf MONITORINGCSV "'%d:%02d'", $hour, $minute;
for ($j = 0; $j < $n; $j++) {
$observation = $target + random_normal();
if ($i >= (0.25 * $m)) {
if ($i < (0.75 * $m)) {
$observation += ($drift / (0.5 * $m)) * ($i - (0.25 * $m));
} else {
$observation += $drift;
}
}
printf MONITORINGCSV ",%7.3f", $observation;
}
printf MONITORINGCSV "\r\n";
}
close(MONITORINGCSV);
en:MATLAB
%
% display an s control chart in MATLAB
%
clear
%
% Phase I
%
% compute the control chart center line and control limits based on a
% process that is simulated to be in a state of statistical control
%
setupobservations = csvread('xs_setup.csv');
setupstats = controlchart(setupobservations, 'charttype', 's');
%
% Phase II
%
% read in the process observations representing the monitoring phase
%
observations = importdata('xs_monitoring.csv');
%
% first column is the time of the observation (24 hour clock)
%
halfhourlylabel = observations.rowheaders;
%
% second column consists of the observations (counts of
% nonconformances per rational subgroup)
%
monitoringobservations = observations.data;
%
% just display labels on the "on the hour" ticks
%
emptylabel = cell(size(monitoringobservations,1) - size(halfhourlylabel,1), 1);
emptylabel(:) = {''};
hourlylabel = vertcat(halfhourlylabel(2:2:end), emptylabel);
%
% plot the control chart for the monitoring phase observations
%
monitoringstats = controlchart(monitoringobservations, ...
'charttype', 's', ...
'label', halfhourlylabel.', ...
'mean', setupstats.mu, ...
'sigma', setupstats.sigma);
title('s chart for quality characteristic XXX')
xlabel('Sample')
ylabel('Standard deviation (units)')
%
% the labels supplied to controlchart() only appear when the user
% selects a plotted point with her mouse--we have to explicitly
% set labels in the X axis if we want them
%
set(gca,'XTickLabel', hourlylabel)
Items getoond in dit bestand
beeldt af
Waarde zonder Wikidata-item
22 jun 2013
Bestandsgeschiedenis
Klik op een datum/tijd om het bestand te zien zoals het destijds was.
Datum/tijd | Miniatuur | Afmetingen | Gebruiker | Opmerking | |
---|---|---|---|---|---|
huidige versie | 22 jun 2013 16:05 | 560 × 420 (4 kB) | DanielPenfield | User created page with UploadWizard |
Bestandsgebruik
Geen enkele pagina gebruikt dit bestand.
Globaal bestandsgebruik
De volgende andere wiki's gebruiken dit bestand:
- Gebruikt op en.wikibooks.org
Metadata
Dit bestand bevat metadata met EXIF-informatie, die door een fotocamera, scanner of fotobewerkingsprogramma toegevoegd kan zijn.
Gebruikte software | |
---|---|
Horizontale resolutie | 37,8 dpc |
Verticale resolutie | 37,8 dpc |
Auteur | |
Copyrighthouder |
|
Tijdstip van digitalisatie |
|
Omschrijving afbeelding |
|
Informatie afkomstig van https://nl.wikibooks.org Wikibooks NL.
Wikibooks NL is onderdeel van de wikimediafoundation.
Wikibooks NL is onderdeel van de wikimediafoundation.