not enough input arguments
7 ビュー (過去 30 日間)
古いコメントを表示
Hi, Im trying to calculate the energy of this signal. I can't seem to locate the error and i dont know if I defined the inline function correctly. The function has no time interval. Error messages for this code are 'Not enough input argument' and 'Error in indexing'.
This is my code:
f=inline('(4*exp^(-x/10))*rectangularPulse((x-4)/3)','x')
syms x
int((f(x))^2,x);
Not sure where it went wrong.
Help is appreciated and thanks.
0 件のコメント
採用された回答
VBBV
2023 年 5 月 27 日
syms x
f=inline('(4*exp(-x/10))*rectangularPulse((x-4)/3)','x');
int((f(x))^2,x)
2 件のコメント
VBBV
2023 年 5 月 27 日
In the inline function , it seems you have combined Excel & Matlab syntaxes together, for exp function. In excel if you want to compute power a ^ symbol is used, but when you use exp it means a function which has definite syntax
y = exp(4)
y = exp^(4)
その他の回答 (0 件)
参考
カテゴリ
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!