Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi,
the last time i posted really has helped with getting my mathcad file setup the way i want. Im 95 % finished this calculation but not sure how to add what im needing.
If anyone can help me i will be forever greatfull
best regards
Simon
Turn rmv?? into a function dependend on RMV and call it vectorized. So you should get a 5-element vector consisting of the vectors rmv?? you want to plot.
I reread what you wrote and I think I understand better now what you want.
Nevertheless it still applies that you should turn your calculation into functions.
At last you need a function for the calculation of PPO2 which is not only dependend on a (scalar) Time but also on a (scalar) RMV.
Don't think you will have success with vectorization to get the datastructure you need for plottingf. You can either use a small program using loops or use range variables as shown below. The plot is of course a fake as I didn't bother to wade through all those variables and turning them into functions 😉
Im suprised how hard this is to do with mathcad, you would think i could use a set of code with different input variables slightly easier
I will try what you have mentioned however doubt wether i will manage as im not an experienced mathcad user
thanks
You are doing simple calculations (with a lot of variables, though) for one RMV.
If you like to do it for ten different RMV values you can
1) run the sheet ten times with different input and print the results
2) copy the calculations ten times (please don't do that)
3) turn the calculations into a function (better plan it that way from the beginning) and you can call it with as many values you like.
Turning your sheet into a function may be difficult as you are reusing the same variable names and sometimes even for different things while on the other hand you assign variables just different names. This makes the calculations hard to follow for others.
If a result of a calculation is dependent on one or more inputs its usually a good idea to implement it as a function rather than just change th input value on top of the sheet and let it recalculate. Doing it the latter way you can only have one result at the time. If you need the results for different input values at the same time (as you demand for the plot) you need a function you can call with different values.
yeh cheers ! ill hopefully get stuck into mathcad training at some point so i can layout my sheets more methodically ... for now im just going to print the sheet with different values of RMV