when i run matlab code this sentence appear?
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
when i run the code this sentence 'Undefined function or variable 'f'.' and this happens for all variable
- note : the workspace in the program is empty
how can i fixed the problem????
Respuestas (1)
Azzi Abdelmalek
el 4 de Abr. de 2016
This message occurs when you use variables that are not defined. For example:
y=5*t
How Matlab will calculate 5*t if the variable t is not defined. the correct code is for example
t=10
y=5*t
5 comentarios
Firas Al-Kharabsheh
el 4 de Abr. de 2016
Editada: Walter Roberson
el 4 de Abr. de 2016
Azzi Abdelmalek
el 4 de Abr. de 2016
What variable? What code?
Firas Al-Kharabsheh
el 4 de Abr. de 2016
Walter Roberson
el 4 de Abr. de 2016
Editada: Walter Roberson
el 4 de Abr. de 2016
If you had that line in a function, then the variable would be removed from the workspace as soon as that function returned.
Also, if you have a "clear" then you might be destroying the values. You should almost never have "clear all" in a program.
Firas Al-Kharabsheh
el 4 de Abr. de 2016
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!