New to MATLAB here, can anyone tell me why when I try to run this it shows an error saying "Not Enough Input arguments"?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Karthik Agnihotri
am 4 Apr. 2020
Beantwortet: Florian Floh
am 4 Apr. 2020
I_desired=1.15
[t1]=current(I_desired)
function [t1]=current(I_desired)
I=@(t) (I_desired)-(9*exp.^(-t).*sin(2*pi.*t))
t1=fzero(I,0.5)
end
0 Kommentare
Akzeptierte Antwort
Florian Floh
am 4 Apr. 2020
I_desired=1.15;
t1=current(I_desired)
function [t1]=current(I_desired)
% it is exp(), NOT exp.^()
I=@(t) (I_desired)-(9*exp(-t).*sin(2*pi.*t));
t1=fzero(I,0.5)
end
If I use exp() instead of exp.^() I get an output. I hope this helps ;)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!