MATLAB Answers

Create a graph from 2 vectors and a matrix

3 views (last 30 days)
Aigerim Sakhayeva
Aigerim Sakhayeva on 22 Jul 2021
Answered: Star Strider on 22 Jul 2021
Hello. I have a problem plotting. I have X, Y, Z data (Coordinates and Height). X is 3950 data, Y is 3670 data, Z is 3950 x 3670 data. I write plot3 gives an error: Vectors must be the same lengths.
Please help ... How to make a schedule? I cannot delete or adjust the data, this is accurate data.

Answers (2)

KSSV on 22 Jul 2021
Edited: KSSV on 22 Jul 2021
Read about pcolor and surf.
shading interp

Star Strider
Star Strider on 22 Jul 2021
I would use surf or mesh:
surf(X,Y,Z.', 'EdgeColor','none')
to see it from the top, add:


Community Treasure Hunt

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

Start Hunting!

Translated by