![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/250979/image.png)
eval and inline function
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Fangjun Jiang
2019 年 11 月 27 日
f3=inline('1/(sqrt(x^2+y^2))');
x=1/2;
y=5;
f3(x,y)
3 件のコメント
Fangjun Jiang
2019 年 11 月 27 日
編集済み: Fangjun Jiang
2019 年 11 月 27 日
str='1/(sqrt(x^2+y^2))';
eval(str)
Guillaume
2019 年 11 月 27 日
"i want use eval"
Why? It's the one function that beginners should never use.
参考
カテゴリ
Help Center および File Exchange で Function Creation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!