I am working on this code and i can't seem to get it working, been stumped for a couple of days.


Code:


:Disp "SAMPLE SIZES"
:Input N
:If int(N/2)=N/2
:Then
:((N/2-1)!)2*2^(N-2)/(N-2)!
* (2/π /(N-1))→C
:Else
: (2π _/(N-1))*(N-1)!/((N-1)/2)!
/((N-3)/2)!/2^(N-1)→C
:End
:Disp "1=XBAR, 2=S"
:Input W
:If W=1
:Then
:2-Var Stats L1,L2
: x →M
: y /C→S
:"M"→Y1
:"M+3*S/ (N)"→Y2
:"M-3*S/ (N)"→Y3
:seq(I,I,1,dim(L1))→L3
:0→Xmin
:dim(L1)+1→Xmax
:Xmax→Xscl
:min(min(L1),M-4*S/ (N))→Ymin
:max(max(L1),M+4*S/ (N))→Ymax
:Ymax-Ymin→Yscl
:Plot1(xyLine,L3,L1,◦)
:ClrHome
:Output(1,4,"XBAR LIMITS")
:Goto 4
:Else
:1-Var Stats L2
: x /C→S
:"C*S"→Y1
:"C*S+3S (1-C2)"→Y2
:"max(C*S-3S (1-C2),0)"→Y3
:seq(I,I,1,dim(L2))→L3
:0→Xmin
:dim(L2)+1→Xmax
:Xmax→Xscl
:min(min(L2),C*S-4S (1-C2))
→Ymin
:max(max(L2),C*S+4S (1-C2))
→Ymax
:Ymax-Ymin→Yscl
:Plot1(xyLine,L3,L2,◦)
:ClrHome
:Output(1,4,"S LIMITS")
:End
:Lbl 4
:PlotsOff
:PlotsOn 1
:AxesOff
:Output(3,1,"UCL")
:Output(3,5,Y2)
:Output(4,1," CL")
:Output(4,5,Y1)
:Output(5,1,"LCL")
:Output(5,5,Y3)

Can you be more specific as to where the Syntax Error occurs? Also, can you not strip out the credit text appended by SourceCoder. Smile
Also could you explain the goal of the program?
The purpose of the program is to draw control charts. graphs will be created 1) Chart will be a Mean Chart
2) Chart will be a Range Chart

Before the charts are created i have also stated that the Upper and Lower Control limits will be calculated as well.

Hopefully this is enough info

Cheers,
cyp2k wrote:
The purpose of the program is to draw control charts. graphs will be created 1) Chart will be a Mean Chart
2) Chart will be a Range Chart

Before the charts are created i have also stated that the Upper and Lower Control limits will be calculated as well.

Hopefully this is enough info

Cheers,



[sarcasm]Now why would you want to do that?[/sarcasm]
0x5
It eliminates for errors during manual calculation, even though i know how to do it manually. But i also want to test it against the calculator answer.
KermMartian wrote:
Can you be more specific as to where the Syntax Error occurs?


Can you?
Svakk wrote:
KermMartian wrote:
Can you be more specific as to where the Syntax Error occurs?


Can you?
Bumped again, so I don't have to run this backwards through SourceCoder to find out. Please elaborate as to which line triggers the Syntax Error.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement