eval and inline function
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
clc
clear all
close all
a=0;
b=2;
y=5;
x=1/2;
f3=inline('1/(sqrt(x^2+y^2)');
[f6]=eval(f2)
??? Undefined function or method 'eval' for input arguments of type 'inline'.
1 comentario
Respuestas (1)
Fangjun Jiang
el 27 de Nov. de 2019
f3=inline('1/(sqrt(x^2+y^2))');
x=1/2;
y=5;
f3(x,y)
3 comentarios
Fangjun Jiang
el 27 de Nov. de 2019
Editada: Fangjun Jiang
el 27 de Nov. de 2019
str='1/(sqrt(x^2+y^2))';
eval(str)
Guillaume
el 27 de Nov. de 2019
"i want use eval"
Why? It's the one function that beginners should never use.
Ver también
Categorías
Más información sobre Function Creation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!