답변 (2개)

Alexander
Alexander 2020년 7월 31일

0 개 추천

x = 1:0.1:10;
y = 1:0.1:10;
[X,Y] = meshgrid(x,y);
Z=1./sqrt(X.^2+Y.^2);
imagesc(x,y,Z)

댓글 수: 4

Zilla Tofte
Zilla Tofte 2020년 7월 31일
Why is the x and y=1:0.1:10...what does that mean?
Zilla Tofte
Zilla Tofte 2020년 7월 31일
The picture of that code is just a blue grid...
Alexander
Alexander 2020년 7월 31일
as an example, I plotted x/y in 1 to 10 range. You can substitute with whatever ranges you need. "0.1" is the step for x/y variables. x = 1:0.1:10 creates a vector of number [1 1.1 1.2 ..... 9.9 10].
madhan ravi
madhan ravi 2020년 7월 31일
surf() instead of imagesc()

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

카테고리

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

질문:

2020년 7월 31일

댓글:

2020년 7월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by