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

2 次查看(过去 30 天)
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 个评论
Divya Patel
Divya Patel 2022-4-4
i get the following error, i have attched .mat file with my workspace data. the dimentions seem right idk what is wrong.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by