Home > OS >  Merge several 2D plot into one 3D plot in MATLAB
Merge several 2D plot into one 3D plot in MATLAB

Time:08-22

I have three 2D plot that depends on the same x-variable. picture and these 3 plots are for different resolutions. the 3rd dimension will be low medium and high.

I want them to plot as in the example. Can you help me, please?

CodePudding user response:

This is assuming your 3 vectors have the same dimensions:

  1. Merge your 3 vectors in matrix data as follows: data = [vector1; vector2; vector3];

  2. Use the surf function to plot the resulting matrix: surf(data);

  • Related