plotting two curves together in only one figure for different intervals
조회 수: 1 (최근 30일)
이전 댓글 표시
There are two mathematical functions in below:
y=-0.6729+4.8266x-0.4855x^2+0.0312x^3 from x=0 to x=33.5
y=-486.39+151.64Ln(x) from x=33.5 t0 45
Please help me, how can I plot these together in MATLAB?
댓글 수: 0
채택된 답변
Friedrich
2012년 2월 13일
Hi,
maybe like this:
y_1 = @(x) -0.6729+4.8266*x-0.4855*x.^2+0.0312*x.^3
y_2 = @(x) -486.39+151.64*log(x)
x_1 = 0:0.1:33.5;
x_2 = 33.5:0.1:45;
plot(x_1,y_1(x_1),'b',x_2,y_2(x_2),'b')
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!