The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.
to all
I think I had an example of what I am attempting but lost hard drive a while ago means I have lost it.
I would like to use indexing in a Given block. Please see attached. Can this be done if so what is the correct mathcad 15 syntax?
Aim is to return a vector of solution for each index i
Thanks
Regards
Solved! Go to Solution.
Are you looking for something like this:
From your example it looked like you alwys want to use 1 as guess value for m and not the last m of the iteration. Therefore I also implemented it that way.
The values are not what you expected but I think the routine is doing what you demanded in your description.
You can make the result of the Solve block a function, in your case that would be
msol(i), and then you replace in the first solve block 1=>i, and 2=>i+1
Success!
Luc
Thanks LucMeekes - Half-expected a reply from you 🙂
Not quite success I am afraid - I am sure I did something similar a looong time go but my memory is nearly totally gone
I am getting a "Unitless" issue
Your yv has only one element, you can't have j index that, same as xv.
Success!
Luc
Thanks. But I had in mind the following once I have mj I can calculate vyj which is the starting for the next iteration
j = 1 range xv1-xv2, find m1, calculate yv2
j = 2 range xv2-xv3, find m2 , calculate yv3
j = 3 range xv3-xv4, find m3 calculate yv4
Are you looking for something like this:
From your example it looked like you alwys want to use 1 as guess value for m and not the last m of the iteration. Therefore I also implemented it that way.
The values are not what you expected but I think the routine is doing what you demanded in your description.
Thanks a lot for the input and programm. Not sure I would have figured out the coding. But looking at it makes sense and it's almost obvious.
Don't think the value for mguess make much of difference.
it's interesting that the m3 and m4 (to get yv3 and yv4) are not what I expect. Still a step in the right direction
Thanks a lot
[EDIT]. I can't type numbers! the values in variable ATarget are the cumlutative ara and not the area for each band as I wanted to enter. if one uses Atarget={146.06, 360.62,250}T then the programm returns yv={1,2,0.5,0.5}