Clear Filters
Clear Filters

I have data that is 3x200 I need a xbar and r chart with control limits.

2 views (last 30 days)
I have the data as a .m file. I copied the data from the varibles tab and pasted it into the varible x. So my x varible is a 3x200. Then this is my code to attempt to get the charts needed. plot= controlchart(x,'charttype',{'xbar','r'}) I then get this error,
Error using controlchart>errorcheck (line 972)
WIDTH cannot be larger than the number of points.
Error in controlchart (line 228)
errorcheck(X,ngroups,label,lambda,limits,parent,cctypes,nsigma,...
Error in Untitled (line 2)
plot= controlchart(x,'charttype',{'xbar','r'})
and cannot figure out how to fix it. Anything helps! Thank You!!
  2 Comments
Brady Wayne Robinson
Brady Wayne Robinson on 19 Nov 2019
x=12.0766791127523,12.0346969425125,12.0685707465641,12.0513538538099,12.0916829457500,12.0533189127559,12.0709453307600,12.0600746299876,12.0566890063734,12.0926285972083,12.0497184378901,12.0749681588451,12.0736840239773,12.0936977871460,12.0665522331444,12.0685673094580,12.0620000090843,12.0855947745055,12.0576488350525,12.0639696859515,12.0715390950600,12.0553337921688,12.0757943238317,12.0630632972979,12.0957677513668,12.0629991512194,12.0609277819201,12.1040163140827,12.1045030114765,12.0592110733849,12.0792804833914,12.0637597819164,12.0949946028834,12.0994743085465,12.0500839315273,12.0799193195228,12.0484650268568,12.0404936627734,12.0825147324766,12.0753221795871,12.1071266319774,12.0696645589407,12.0474071513059,12.0769141449450,12.0458908025607,12.0426230576369,12.0659822857160,12.0813673864817,12.0833199386711,12.0685911983097,12.0958434963900,12.0265699450842,12.0971878655582,12.0622298038060,12.0878124336068,12.0757359896754,12.0604424555014,12.0677604192074,12.0703593789763,12.0807800093134,12.0929545501120,12.0571872168253,12.0599069353836,12.0634624579088,12.0321860861199,12.0853130502580,12.0754915115373,12.0624112921423,12.0700966216660,12.0305173736172,12.0709202306016,12.0414456101016,12.1201429138454,12.0515818031130,12.0807005726666,12.0727833395476,12.0931693255427,12.0759168455632,12.0825194254100,12.0993680068545,12.0309699784006,12.0923198884615,12.0504978392725,12.0659804968598,12.0772759629650,12.0710276312573,12.0885798111617,12.0568472422137,12.0675772642158,12.0557426885562,12.0938455369516,12.0653743028802,12.0848101684319,12.0752895385365,12.0653922626129,12.0379017687068,12.0580821247916,12.0651236988037,12.1104324880336,12.0831477116687,12.0974517760180,12.0617008376068,12.0745414948749,12.0545511048080,12.0742904753106,12.0779773047867,12.0671196915662,12.0563201672665,12.0495594424014,12.1031987330095,12.0583614744181,12.0589355412582,12.0527481456117,12.0759324015858,12.0852752755977,12.0865863699833,12.0574036232297,12.0725756480116,12.0705401935576,12.0733459838757,12.0222676258230,12.0613514874616,12.1052511783625,12.0572229017490,12.0724737097074,12.0720894239639,12.0904685039505,12.1051212198308,12.0660142462275,12.0978467638895,12.0601142520649,12.0138038463858,12.0757674420558,12.0723275195835,12.0532106967371,12.0768469440629,12.0573928110953,12.0854950431345,12.0821292252028,12.0684683808113,12.0871137611367,12.0643206901923,12.1008809838623,12.0581262607203,12.0629736480057,12.0675449165874,12.0560318425435,12.0617019352599,12.0857070875824,12.0776407058204,12.0801262544105,12.0783069455181,12.0404937852682,12.0547460855298,12.0326811268160,12.0790149578014,12.0768219511689,12.0703055003412,12.0638630559876,12.0815690569327,12.0906445359661,12.0883428627980,12.1043173013676,12.0544439981519,12.0571595707846,12.0546406058374,12.0702817980694,12.0700082001241,12.0570368583388,12.0760433353618,12.0465550449199,12.0720517928094,12.0898377643978,12.0774161410787,12.0434162091268,12.0656693728296,12.0728511964861,12.0986533426358,12.0353685722050,12.0732188465876,12.1021913095611,12.1060648985252,12.1065267655758,12.0488867213539,12.0648774428254,12.0401771451821,12.0585726418508,12.0399126400894,12.0641165925885,12.0835271873049,12.0709515618784,12.0750139968642,12.1033577196302,12.0934587441139,12.0728261273669,12.0719554015597,12.0686588528667,12.0707332516367,12.0472847562072,12.0430517540933;12.0519436835190,12.0730068268517,12.0527311039655,12.0563277647296,12.0989359105869,12.0830788848733,12.0618582411043,12.0978987704473,12.0283915900485,12.0698898749587,12.0729518460505,12.0825442510523,12.0597937585034,12.0471323870782,12.0851246511472,12.0803684336076,12.0904671354177,12.0435351105902,12.0972490495380,12.0883043065971,12.0433533399329,12.0894493640295,12.0408956702177,12.0582140650011,12.0935743439536,12.0680643080199,12.0644492475456,12.0943652161082,12.1031256890526,12.0446215091638,12.0939265928515,12.0478044601952,12.0697711495726,12.0868412917807,12.0827833241125,12.0609539079552,12.1065016547504,12.0888859059972,12.0751394723665,12.0527734261683,12.0885556812135,12.0517213033223,12.0887301871951,12.0564646053206,12.0570161976933,12.0600400728704,12.0682691947435,12.1130989002958,12.0717015802241,12.0939644627575,12.0552158166791,12.0459991823635,12.0459644997058,12.0932645994711,12.0840603372609,12.0619049038865,12.0743128828400,12.0722418089141,12.0802623211221,12.0490039750961,12.0647421538871,12.0472196083550,12.0960333749537,12.0474884669922,12.0729344299268,12.0634517726808,12.0809633634481,12.0858184224757,12.1038420475865,12.0567078010530,12.0705660877140,12.0810126673139,12.1107926927241,12.0486446412283,12.1130552724547,12.0621962632450,12.0805418839498,12.0905067444090,12.0991129177838,12.0718582146591,12.0732339374083,12.0852746733379,12.0834616283676,12.0411966860089,12.0537600640233,12.0862531630892,12.0455860350962,12.0671330546032,12.0733537253817,12.0421670039139,12.0639132174745,12.0825890396330,12.1163114462828,12.0932903961442,12.0658571558831,12.0290282012070,12.0462908842028,12.1002454063870,12.0938363441953,12.0745981593771,12.0607877358107,12.0412768165237,12.0571060732911,12.0485482659375,12.0658031315798,12.0904791530237,12.0507924783030,12.1120369478226,12.0856962048365,12.0839313578670,12.0660035092556,12.0534338643075,12.0756290040460,12.0598544964426,12.0513017096887,12.0585229801457,12.0470805189645,12.0847763816692,12.0719260174520,12.0508989761878,12.0446276398584,12.0811019802572,12.0977145274641,12.0785679671145,12.0722017736623,12.0758052421694,12.0658632271550,12.0497543274305,12.0966563304346,12.1046791824871,12.0879212786986,12.0841372061611,12.0533979073629,12.0785946257648,12.0637255601092,12.0627616909213,12.0811016331612,12.0760262155346,12.1031913154635,12.0675638210553,12.0566172022420,12.0704153682924,12.0533518961179,12.0893203768816,12.0952041038205,12.0689727870311,12.0929225861484,12.1086084629590,12.0553457698942,12.0641045531054,12.0509611862144,12.1051143125717,12.0892918856456,12.0859367996049,12.0525704413949,12.1103160103873,12.0737097527482,12.0626559258137,12.1208286228164,12.0897192383705,12.0771969218148,12.0667232821542,12.0863322407339,12.0663593359554,12.0937334463231,12.0489351442747,12.0780250810269,12.0489882822097,12.0897224483310,12.0971418540287,12.1127076444690,12.0374972044765,12.0960195121062,12.0652873123550,12.0818369208999,12.0489797403634,12.0539934642266,12.0946443265954,12.0967959928627,12.0502141978583,12.0586670342823,12.1068083580750,12.0865444022282,12.0572681207195,12.1211761510861,12.0743814285989,12.0713317702529,12.0504125024660,12.0867152361283,12.0737978992144,12.1005190200507,12.0499646049527,12.0604696915213,12.0886093200958,12.1013942516692,12.0837900185212,12.0663323936549,12.0747253999890,12.0556044687940,12.0572344558126;12.0729447605181,12.0942835449555,12.0375471582550,12.0536447971811,12.0992724690952,12.0397297372427,12.0872310788517,12.0660462097677,12.0445450218674,12.0774555955826,12.0655461860307,12.0674342192671,12.0682187681263,12.1182400682256,12.0580863655635,12.0988587761330,12.0725142036843,12.0457896745426,12.0582556850065,12.0911743699446,12.0662633786210,12.0737568345934,12.0644403615261,12.0445343821473,12.0847854500968,12.0808120656413,12.0563593436229,12.0965248329042,12.0881966571642,12.0750826029050,12.1036386964773,12.0713653741890,12.0595469907696,12.0852391237228,12.0797413393785,12.0924409468079,12.0569938199696,12.0565023875875,12.1096476191789,12.0748512856633,12.0850750646150,12.0498738560633,12.0850118465881,12.0288376299373,12.0555423667459,12.0444944928726,12.0853662340497,12.0758202705093,12.0351264969975,12.0932263490973,12.0456156443226,12.0718318113355,12.0765366018086,12.0418908295767,12.0489258891845,12.0999283371619,12.0801054862921,12.0926384903781,12.0777351897660,12.0587171129482,12.0902813843595,12.0736193055133,12.0589254657963,12.0754005109935,12.0521284651615,12.0579541581527,12.0468772246503,12.0373968005718,12.0632386047042,12.0870896194199,12.0519875201979,12.0896299601708,12.0545982809869,12.0652065581280,12.0710986048910,12.0437047738527,12.0733513244596,12.0565659518455,12.0507912525595,12.0282688187501,12.0510308743295,12.0235819152931,12.0649424597199,12.0945234786461,12.0709908524648,12.0247687837114,12.0805959461597,12.0752612399920,12.1002031545286,12.1036146566603,12.0483212006086,12.0859002850145,12.0631851074184,12.0607844735344,12.0929864597676,12.0635082895029,12.0543950931592,12.0856090437430,12.0622845188009,12.0851920189956,12.0644303398649,12.0742672540257,12.0589780949757,12.0751436564136,12.1021211931031,12.0847070772497,12.0701973439078,12.0695723052911,12.0763530195976,12.0456909100592,12.0431881124117,12.0887815036462,12.0814374852704,12.0359002015793,12.0536496228907,12.1068841474794,12.0842161549880,12.0784179233165,12.0789872968535,12.0872664126715,12.0631547214579,12.0638818642272,12.1041001118143,12.0463853078135,12.0741977230309,12.0842879879378,12.0635471956614,12.0551031431071,12.0734592920028,12.0855637873908,12.0805444487378,12.0842227621023,12.1308591353927,12.0671919067646,12.0514113425137,12.1111845505462,12.1128877563621,12.0993911454496,12.0547891903482,12.0724115821800,12.0595123555445,12.0691201102869,12.0709018041333,12.0601714635720,12.0688195886191,12.0794849109768,12.0526976263755,12.1094813166328,12.0669034303412,12.0746896359463,12.0766875030750,12.0834578258177,12.0584104370902,12.0597732344090,12.0704751583028,12.0700819436557,12.0625766513893,12.0543792220059,12.0358118019787,12.0341936908581,12.0985484302623,12.0869353667575,12.0350063531977,12.0676940662274,12.0748154228633,12.0843964019848,12.0556767772307,12.0677964460548,12.0452934993355,12.0800055934742,12.0306360845332,12.0504828434806,12.0445578748734,12.0343132428175,12.0618758755030,12.0638178814976,12.1194866911408,12.0354170207240,12.0912125667043,12.0658646604975,12.0783245101354,12.0649572491753,12.0722007847606,12.0813542106488,12.0942638411443,12.0561410615822,12.0292631491024,12.0889243689527,12.0621244037427,12.0814885846202,12.0893654730236,12.1031838708254,12.0783772487394,12.0879985092938,12.0907707788685,12.0734504850077,12.1052955890173,12.0650476555541,12.0909556475640,12.0941550547032

Sign in to comment.

Answers (1)

Mahesh Taparia
Mahesh Taparia on 22 Nov 2019
Hi Brady
You are getting an error of some size mismatch of your input data. The variable ‘x’ is having a size of 3X200. The error can be overcome by replacing x by transpose of x in controlchart function as the size becomes 200x3 and width criteria can be satisfied. For example,
plot= controlchart(transpose(x),'charttype',{'xbar','r'})
For more information you can refer to the documentation of controlchart here.

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!