Plotting a graph with multiple constraints
이전 댓글 표시
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
답변 (1개)
Peng Li
2020년 3월 26일
0 개 추천
x >= 2 & x <= 5
this express will consider both constraints in. Is this what you need?
댓글 수: 2
Mithuisan Sutharsan
2020년 3월 26일
Peng Li
2020년 3월 26일
x = 2:.1:5;
y = cos(x);
plot(x, y);
is this what you need?
카테고리
도움말 센터 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!