Skip to main content
1-Visitor
September 18, 2018
Solved

extracting data from mathcad coding

  • September 18, 2018
  • 3 replies
  • 2917 views

 

I have written a for loop code and I want to assign the final answer to a variable that is out side the code so I can use it else where in the program.

 

I have attached the file. The value returned by k is the final answer 

Thanks!

Best answer by LucMeekes

Make sure you have an index into the vector and plot it against that:

LM_20180925_Plot.png

You can also plot two (equal length!) vectors against each other:

LM_20180925_Plot1.png

Success!
Luc

3 replies

23-Emerald IV
September 18, 2018

There's a better way:

LM_20190918_Vector.png

Success!
Luc

23-Emerald IV
September 19, 2018

And if you want it simpler, without explicitly defining a range:

LM_20180919.png

Success!
Luc

25-Diamond I
September 18, 2018

Even simpler by using the undocumented trick to turn a range into a vector by using inline evaluation:

B.PNG

Asad1-VisitorAuthor
1-Visitor
September 25, 2018
how do i plot this vector on a 2-D plot Thanks!
LucMeekes23-Emerald IVAnswer
23-Emerald IV
September 25, 2018

Make sure you have an index into the vector and plot it against that:

LM_20180925_Plot.png

You can also plot two (equal length!) vectors against each other:

LM_20180925_Plot1.png

Success!
Luc