Error using fzero (line 184) FUN must be a function, a valid character vector expression, or an inline function object. What is the issue here?
Ältere Kommentare anzeigen
vi = 600;
v = 0:0.01:1000;
sig = input('Input sigma value: ');
w = input('Input weight of airfoil: ');
f = @(v) 0.01*sig*v.^2 + (0.95/sig)*((w.^2)./(v.^2));
fvi = f(vi);
root = fzero(fvi, vi)
I have no idea why I'm encountering this error, can someone please help me.
1 Kommentar
Broden Tripcony
am 1 Okt. 2021
Antworten (1)
v is the variable of the function. You do not have to deine it as a vector.
fzero expects a function handle, but f(vi) is a number.
vi = 600;
sig = input('Input sigma value: ');
w = input('Input weight of airfoil: ');
f = @(v) 0.01*sig*v.^2 + (0.95/sig)*((w.^2)./(v.^2));
root = fzero(f, vi)
1 Kommentar
Broden Tripcony
am 1 Okt. 2021
Kategorien
Mehr zu Airfoil tools finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!