Hi,
first of all sorry for my poor English.
I've a little trouble with mathcad usage; for sure is a silly question but this is my very first approach to function programming.
i've three vector (not range variables) filled with symbolics value only in some position and zero value
in others.
This came because i've specified some value of interest of the vectors like for example :
vect_1(13):= v1+v2 (of course with right mathcad syntax..here i can't write pedix - not literal pedix of course)
vect_1(38):=v1-v2 (in general each element is a function of v1 v2.. vn coordinates)
so mathcad create a vector "vect_1" filling the place at 13 and 38 with my desidered symbolic values ; set zero in other place.
With these 3 vector now i've to cycle and , for each element ,i want to store in other new vector the result of this formula:
result(i) = 0.5 * vect_1(i)^2 * vect_2(i) / vect_3(i) ;
But because vect_3 is partially filled with zero, my for cycle stop obviously when the first "div by zero" is executed.
I try with if construct to skip zero element but the syntax :
if ( vect_3(i) <> 0) dosent' work, because i suppose mathcad can't valutate symbolic condition with logical boolean equal.
Please see the attached file; i've included all the code, but the error is in only last little block .
Thanks in advance.