Hi all,
I have a range z from 0 to 11,5m
I've created function y(z)
I want to extract the values of y(z) as an array and extract the array to Excel.
Is it possible to extract the values as an array without converting z to a vector?
Best regards,
Anders
Solved! Go to Solution.
Hi,
When faced with a range "vector iterator" and a matching "vector" I do this. A range is different to a vector.
Create a "vector iterator" range iz, and create a matching vector z. I do this together in a little function unifspace.
You can then iterate through the vector z with the range iterator iz.
WRITEEXCEL is the function to write a spreadsheet of the vector.
You can also use vectorization to create P from z without iz
Now you know the difference between a range and a vector there is an undocumented trick in Prime.
If you use an equal sign after the definition of a range it turns it into a vector.
Hi,
When faced with a range "vector iterator" and a matching "vector" I do this. A range is different to a vector.
Create a "vector iterator" range iz, and create a matching vector z. I do this together in a little function unifspace.
You can then iterate through the vector z with the range iterator iz.
WRITEEXCEL is the function to write a spreadsheet of the vector.
You can also use vectorization to create P from z without iz
Now you know the difference between a range and a vector there is an undocumented trick in Prime.
If you use an equal sign after the definition of a range it turns it into a vector.
Hi,
Thank you, it works perfectly!
Best regards,
Anders
For those of you watching in Mathcad Express 7 ...
Stuart
Such capability is so useful that I've got a set of related functions in my Default Template.
The nice thing about using your matrix(n,1,max) is that it's so simple even I can remember it, It's simple to make linspace and linrange stand-alone using this expression.
Stuart
T is just a transpose function that makes it easier to deal with expressions that may give either an array or a scalar result. It also helps make nested vector results more compact.