필터 지우기
필터 지우기

How to shorten the code for function with varying single parameter input to plot them on the same screen

조회 수: 2 (최근 30일)
Hello,
There is a y (pressure) function with one output that changes depending on input variable x (pipe diameter). I have three different input variable x. I need to plot the the variation of y function across the parameter z using the three different parameters x on the same plot. These parameters will be displayed as legend. I wrote 3 three different codes for y functions for different x values . But it is too lengthy. Is there short way to do it? You can see the results in the file attached.
  댓글 수: 1
Rik
Rik 2017년 3월 12일
How is your code too lengthy? And what is your code? It seems like it gets the job done. Is it too slow? Is it too difficult to understand for a third party reading your code?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by