I have different scripts of different algorithms with each showing plots of single algorithm outputs. I want to plot them in single figure with legends like shown in attachment

댓글 수: 2

As far as I understand, your problem has been associated with the fact that values on the left figure are about 100 times more than those on the right. That's why it is different to compare them.
A typical work arround in such a case is using logarithmical coordinates. So calculate Y=log(OF) for all the curves and plot them, for example, with
plot(t,Y1,t,Y2,t,Y3, ... ,t,Y100,).
Good luck!
Star Strider
Star Strider 2023년 3월 18일
And another option is to use yyaxis.

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

 채택된 답변

Star Strider
Star Strider 2023년 3월 17일

0 개 추천

I do not see the attachment.
However the easiest way mightr be to save the data from each script to .mat files, and then load them into one or the other scripts, or a completely new script, and plot them there.
.

댓글 수: 4

I have updated the answer with the required output. Can you now tell me how it can be done
Star Strider
Star Strider 2023년 3월 18일
Just as I first described. Different script result require that you save the data to a file in each script, and then read them in a third script and do the plotting.
Ok Thank you so much
Star Strider
Star Strider 2023년 3월 18일
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

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

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  원격 교육 커뮤니티

카테고리

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

질문:

2023년 3월 17일

댓글:

2023년 3월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by