If I have multiple function, then how can I get the function of min(fun1,fun2,fun3,...)?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Gookki Jeong
am 31 Jul. 2020
Kommentiert: Vladimir Sovkov
am 31 Jul. 2020
If there are functions like
R1(x), R2(x), R3(x), R4(x)
then when I need to draw new funcion graph that show the min value function for x
like
min(x)= min(R1(x),R2(x),...)
how can I code this function?
0 Kommentare
Akzeptierte Antwort
Vladimir Sovkov
am 31 Jul. 2020
Bearbeitet: Vladimir Sovkov
am 31 Jul. 2020
xmin=min([R1(x(:)');R2(x(:)');...]); % to get a correct result, the argument must be a row-vector: x(:)' turns any input array to it; do not use "min" for your inner variables as it is the name of the inbuilt matlab function
plot(x,xmin,'.-');
1 Kommentar
Vladimir Sovkov
am 31 Jul. 2020
The very first version was erronious. Get the current corrected version.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!