how can i plot a function with tow variable(x,y) in 2D ?

답변 (1개)

Walter Roberson
Walter Roberson 2018년 3월 19일

0 개 추천

You have two input dimensions (x and y) and one output dimension (TR), for a total of 3 dimensions. You need a 3 dimensional plot to represent that.
If for some reason your plot is restricted to two output spatial dimensions, then you will need to encode one of the three dimensions somehow, such as by color or transparency or marker size.

댓글 수: 2

Using 0:0.1:100 is not valid for fplot. You need to pass in [0 100] instead.
Note that you are calling fplot with a function of only one variable, which is a different situation than a function of two variables.
You can call
fsurf(@(x,y) sqrt((1+(2*0.1*x).^2)./((1-y.^2).^2+(2*0.1*x).^2)),[0 100 0 100])
but that does not produce a 2D plot.

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

카테고리

도움말 센터File Exchange에서 Vector Fields에 대해 자세히 알아보기

태그

질문:

2018년 3월 19일

댓글:

2018년 3월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by