how do plot a 3d plot, example like a water fall plot?

so my code is as following
plot3(radiationx,radiationy,radiationz)
here the matrix data base file looks like this
here the error i keep getting is "Vectors must be the same length"
as seen they are same dimentions, i even tried meshgrid function but similar error of length. what am i doing wrong here

답변 (1개)

Voss
Voss 2022년 4월 4일
Try this:
% first I make some variables with the same names
% and sizes as yours, since I don't have yours:
radiationx = (1:247).';
radiationy = 1:24;
radiationz = rand(247,24);
% now I make a waterfall plot out of them:
[XX,YY] = meshgrid(radiationx,radiationy);
waterfall(XX,YY,radiationz.')

댓글 수: 1

i get the following error, i have attched .mat file with my workspace data. the dimentions seem right idk what is wrong.

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

카테고리

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

제품

릴리스

R2018b

질문:

2022년 4월 4일

댓글:

2022년 4월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by