help with functions and ranged variables
help with functions and ranged variables
(OP)
hello just a newbee question...
I wanted to assign the result of a function with a ranged variable as input to another variable... but mathcad13 gives an error saying "this value must be a scalar or a matrix"..
example:
i:=1..10
f(x):=x^2
cd:=f(i) <<<<<error f(i) must be a scalar or matrix..
is there a way to get the result as a list..
thanks, anyone..
I wanted to assign the result of a function with a ranged variable as input to another variable... but mathcad13 gives an error saying "this value must be a scalar or a matrix"..
example:
i:=1..10
f(x):=x^2
cd:=f(i) <<<<<error f(i) must be a scalar or matrix..
is there a way to get the result as a list..
thanks, anyone..





RE: help with functions and ranged variables
i := 1..10
j[i := i (if ORIGIN=1), or j[i-1 := i (if ORIGIN=0)
f(x) := x^2
cd := f(j)
Peter
RE: help with functions and ranged variables
and pls. one more question..
is there a built in function in mathcad that does something like this.. ie create a vector from a list with specific stepsize.. something like..
i := 0.1,0.2..10
j[(i*10)-1 := i
I just thought something like this this is somewhat very common and there might be some kind of builtin functions for this... instead of having to write a temporary list for every vector variable I wana create..
thankyou very much...
RE: help with functions and ranged variables
In the meantime you can create a worksheet with your own user defined functions and include it at the top of each worksheet as a reference (Insert > reference).
Peter