PLOT TWO FUNCTION IN THE SAME GRAPHIC

Hi everybody,
Another way to view two functions in the same graphic without using the command 'plot'?
Thanks a lot,
Mariana

 채택된 답변

Walter Roberson
Walter Roberson 2012년 7월 24일

0 개 추천

Yes. "hold on" works for most graphic routines. (There are some graphic routines which are defined to open their own figure.)

댓글 수: 3

Mariana
Mariana 2012년 7월 24일
Thank you Walter,
The problem is that my first graph is generated by a little program in matlab, and i wanna add a function to that graph. I try with HOLD ON.
Mariana
Mariana 2012년 7월 25일
편집: Walter Roberson 2012년 7월 25일
Walter,
I get it, but now i want to label a point.. my codes are:
>> hold on;
>> x1=-5:5;
>> x2=-2/3+2/3*x1;
>> plot(x1,x2,'Color',[.7 0 0]);
>> hold off;
If i want to label the point (4,4) what codes to write?.. Thanks for your help!
Mariana

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by