If statements for matrices
If statements for matrices
(OP)
I am quite new to Mathcad, and am wondering if there's a simple way to run 1D matrices through if statements. Currently the if statement just complains about the variable not being a scalar, and doesn't therefore process the variable.
Thank you.
Thank you.





RE: If statements for matrices
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: If statements for matrices
eg: i:=0..3
ans[i:=if(v[i>0,3,-3)
or
for i e 0..3
ans[i<- 3 if v[i>0
ans[i<- -3 otherwise