Two surface with different value of x axis

2 views (last 30 days)
I have two table of data.
Considert Y axis as 1 to 10 for both
X axis value from 10 to 3000 with 10 step (10:10:3000) for one and 10 to 4200 with 50 step (10:50:4000) for the others.
and Z is the output of multiple functions for each.
Is it possible to plot these two surface (surf) in one diagram?

Accepted Answer

Torsten
Torsten on 22 Apr 2022
surf(X1,Y,Z1)
hold on
surf(X2,Y,Z2)
Or what do you mean ?
  4 Comments
Torsten
Torsten on 22 Apr 2022
Edited: Torsten on 22 Apr 2022
[XX,YY] = meshgrid(X1,Y);
[XXX,YYY] = meshgrid(X2,Y);
surf(XX,YY,Z1)
hold on
surf(XXX,YYY,Z2)
Test whether the sizes of XX,YY and Z1 as well as XXX,YYY and Z2 are equal.
Mohammad Nasiri
Mohammad Nasiri on 22 Apr 2022
Thank you so much
the sizes were not equal.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!