someone help me plzzz :(
Ältere Kommentare anzeigen
tic
syms x y;
f(x) = (2.*x-1).*sin(pi.*x);
for i=1:25
y(i)=diff(f(x),i);
end
fun=matlabFunction(y');
x=-2:0.01:1;
result=fun(x);
maxres = max(result,[],2)
for i=1:25
if maxres(i)<0.001
break
end
end
someone can tell me the way to find max y(i) = diff (f(x),i) in every step and check it
if max(y(i))< 0.001 then stop the loop
1 Kommentar
madhan ravi
am 24 Dez. 2018
Bearbeitet: madhan ravi
am 24 Dez. 2018
isn't https://www.mathworks.com/matlabcentral/answers/437029-help-me-to-find-max the same question ?
Akzeptierte Antwort
Weitere Antworten (1)
KSSV
am 24 Dez. 2018
f= @(x) (2.*x-1).*sin(pi.*x);
x=-2:0.01:1;
for i=1:25
y=diff(f(x),i);
if max(y)<0.001
break
end
end
Kategorien
Mehr zu Assumptions finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!