illegal context - can't figure out my error
illegal context - can't figure out my error
(OP)
Hi all,
I'm a new Mathcad user and am encountering an illegal context error. I can't figure out the cause of the error. Lambda is a range variable that is defined.

I did a simple program, reducing this equation down to
b = 1
c = 1
g(x) = 1+x
f(x) = asin[g(x) * sin[b - asin[(1/g(x)) * sin(c)]]]
and it worked fine. So the issue is obviously in my messy equation above, but I am still not seeing it. Any ideas?
Thanks!
Martha
I'm a new Mathcad user and am encountering an illegal context error. I can't figure out the cause of the error. Lambda is a range variable that is defined.

I did a simple program, reducing this equation down to
b = 1
c = 1
g(x) = 1+x
f(x) = asin[g(x) * sin[b - asin[(1/g(x)) * sin(c)]]]
and it worked fine. So the issue is obviously in my messy equation above, but I am still not seeing it. Any ideas?
Thanks!
Martha
RE: illegal context - can't figure out my error
http://collab.mathsoft.com/~Mathcad2000
TTFN
RE: illegal context - can't figure out my error
Cheers
Greg Locock
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
RE: illegal context - can't figure out my error
RE: illegal context - can't figure out my error
If λ is a range variable, then why do you want type in its value each time to evaluate ψfs?
Regards,
Cory
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.
RE: illegal context - can't figure out my error
Greg, I fixed the missing square bracket, still get the same result. Don't know how I managed to define the function with the missing bracket!
jghrist, ?fs was created with ?.fs so no problem there.
Cory, ? is defined as ?:=.700, .. .900 . I need to evaluate ?fs at one particular ? as well as at all values of ? for use in an equation later in the program. I am evaluating ?fs at 1 in the above example for debugging purposes.
Thanks all!
Martha
RE: illegal context - can't figure out my error
Are you sure you defined λ:.700, .. .900? MathCad requires a number immediately after the comma or the range will be undefined. If you typed λ:.700 .. .900, then MathCad assumes the step is equal to 1 and only defines λ= 0.700 since 1.700 is beyond your upper limit.
Regards,
Cory
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.
RE: illegal context - can't figure out my error
TTFN
RE: illegal context - can't figure out my error
As for vectorizing the function...since lambda is a range variable, wouldn't that also mean that I would have to vectorize the function nfs(lambda)? That function evaluates just fine and does not give an error.
RE: illegal context - can't figure out my error
TTFN
RE: illegal context - can't figure out my error
b> You must have a typo somewhere. I copied your sheet (would have been really easier if you had posted it) and don't seem to get your error. Results were:
0.9729
0.9729
0.9728
0.9728
0.9727
0.9727
0.9727
0.9726
0.9726
0.9725
0.9725
0.9724
0.9724
0.9723
0.9723
0.9723
0.9722
0.9722
0.9721
0.9721
0.9720
0.9720
0.9720
0.9719
0.9719
0.9718
0.9718
0.9717
0.9717
0.9717
0.9716
0.9716
0.9715
0.9715
0.9715
0.9714
0.9714
0.9713
0.9713
0.9712
0.9712
0.9712
0.9711
0.9711
0.9710
0.9710
0.9710
0.9709
0.9709
0.9708
0.9708
0.9708
0.9707
0.9707
0.9707
0.9706
0.9706
0.9705
0.9705
0.9705
0.9704
0.9704
0.9703
0.9703
0.9703
0.9702
0.9702
0.9702
0.9701
0.9701
0.9700
0.9700
0.9700
0.9699
0.9699
0.9699
0.9698
0.9698
0.9697
0.9697
0.9697
0.9696
0.9696
0.9696
0.9695
0.9695
0.9695
0.9694
0.9694
0.9693
0.9693
0.9693
0.9692
0.9692
0.9692
0.9691
0.9691
0.9691
0.9690
0.9690
0.9690
0.9689
0.9689
0.9689
0.9688
0.9688
0.9688
0.9687
0.9687
0.9687
0.9686
0.9686
0.9686
0.9685
0.9685
0.9685
0.9684
0.9684
0.9684
0.9683
0.9683
0.9683
0.9682
0.9682
0.9682
0.9681
0.9681
0.9681
0.9680
0.9680
0.9680
0.9679
0.9679
0.9679
0.9678
0.9678
0.9678
0.9677
0.9677
0.9677
0.9676
0.9676
0.9676
0.9675
0.9675
0.9675
0.9674
0.9674
0.9674
0.9674
0.9673
0.9673
0.9673
0.9672
0.9672
0.9672
0.9671
0.9671
0.9671
0.9670
0.9670
0.9670
0.9670
0.9669
0.9669
0.9669
0.9668
0.9668
0.9668
0.9667
0.9667
0.9667
0.9667
0.9666
0.9666
0.9666
0.9665
0.9665
0.9665
0.9664
0.9664
0.9664
0.9664
0.9663
0.9663
0.9663
0.9662
0.9662
0.9662
0.9662
0.9661
0.9661
0.9661
0.9660
0.9660
0.9660
0.9660
0.9659
0.9659
0.9659
0.9658
TTFN
RE: illegal context - can't figure out my error
TTFN
RE: illegal context - can't figure out my error
Thanks for all of your help! I never got around to posting my program last week, so thank you for taking the time out to reproduce the whole thing. I will try to figure out where the typo is in my last equation. Thanks again!
Martha
RE: illegal context - can't figure out my error
Thanks again!
Martha