Plotting a graph with multiple constraints
Ältere Kommentare anzeigen
Im having trouble trouble plotting a function given multiple constraints.
For example where f(x) = cos(x)
Constraints
x>=2
x<=5
I was wondering how i could plot this graph on matlab showing both the constrains given,
Thanks in Advance for your help
2 Kommentare
darova
am 26 Mär. 2020
Can you show your code? Your attempts?
Mithuisan Sutharsan
am 26 Mär. 2020
Antworten (1)
Peng Li
am 26 Mär. 2020
0 Stimmen
x >= 2 & x <= 5
this express will consider both constraints in. Is this what you need?
2 Kommentare
Mithuisan Sutharsan
am 26 Mär. 2020
Peng Li
am 26 Mär. 2020
x = 2:.1:5;
y = cos(x);
plot(x, y);
is this what you need?
Kategorien
Mehr zu Histograms 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!