Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
I expect this is something stupid I've done, but I can't see what.The attached file accepts the variable 'z until the last line. Why?
Solved! Go to Solution.
Prior to your problem with z; x and y are predefine vectors, but z was always input as a scalar in the functions.
Up to the point of your problem, the variable z was never assigned a value, out side of an argument list.
In the last equation cf does not have an argument list (x,y,z), which I think you want. At least you need cf(z)=
Since the vectors x and y were defined prior to the function definition, they do not actually have to be in the argument list, unless you want to use the functions again with different x and y vectors.
Prior to your problem with z; x and y are predefine vectors, but z was always input as a scalar in the functions.
Up to the point of your problem, the variable z was never assigned a value, out side of an argument list.
In the last equation cf does not have an argument list (x,y,z), which I think you want. At least you need cf(z)=
Since the vectors x and y were defined prior to the function definition, they do not actually have to be in the argument list, unless you want to use the functions again with different x and y vectors.
Thanks: something stupid, as I thought. cf should be cf(x,y,z).