cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

variable is "undefined" why?

btaylor-4
1-Newbie

variable is "undefined" why?

I don't understand why I can't evaluate the equation in attached spreadsheet  -- bottom of the page.  It keeps telling me the independent variable is undefined?  Can someone explain what I'm doing wrong?  I would like to also take the first, second, and third derivatives of this equation, but can't do that without being able to evaluate the equation.

4 REPLIES 4

We need data for your sheet!

Valery Ochkov wrote:

We need data for your sheet!

Not necessarily as we see the data necessary.

See attach

Two problems:

1) first you are trying to evaluate a function definition which has to fail. You would rather define the function and then evaluate in a separate region.

While it looks like you get what you expect, you won't have much fun with the result as you can't save it to a variable or use it other than just looking at:

The result you get is NOT a true vector (unfortunately it looks that way but its just some sort of list/sequence which is og no use for further calculations. Thats because

2) you use a range variable as Z and not (as you should) a vector. Define Z as vector and call Phi with Z as argument to get a true vector which can be assigned a variable and you can grab single values from or plot. Don't forget to vectorize the function call when you use a vector as function argument!

OK, I am not sure if I had scrolled down far enough in your sheet. I stopped at the first error which was not because of the missing data file.

Concerning the last error in your sheet it really looks like you forgot to define t.fl and b.fl.

Not sure which "equation" you were talking of in your initial question, but keep in mind, that you can only take derivatives of functions, not of equations!

Top Tags