Plot 2 Matrix or surf

1 view (last 30 days)
LifeOfPai
LifeOfPai on 2 Jan 2016
Edited: LifeOfPai on 4 Jan 2016
Hey! I surf map1 from "mapmtx map1" and its look like this:
I want to add a path. the path it`s a other matrix that have a coordinates on the map. How i can plot the 2 matrix? if i click the 2 matrixs together and I click "plots" it`s not working...
Thank you all!

Accepted Answer

Walter Roberson
Walter Roberson on 3 Jan 2016
surf(FirstVariable);
hold on
surf(SecondVariable);
  3 Comments
Walter Roberson
Walter Roberson on 3 Jan 2016
I do not understand what you mean by a "path" in this connection. And what values from the first matrix are to be replaced?
I am wondering if what you need is a scattered interpolant, or if you need to pass x and y coordinates in to surf().
LifeOfPai
LifeOfPai on 3 Jan 2016
I have martix map1 50X50 the surf and I have matrix B 50X50 the path I want to plot to screen the map and only path line of matrix b, how i can do this?

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 3 Jan 2016
If you want them side by side and they are the same size you can stitch them together before calling surfs
surf([matrix1, matrix2]);
Or you can treat as images and use imshowpair() or imfuse().
  1 Comment
LifeOfPai
LifeOfPai on 3 Jan 2016
Hey, I have a problem...
Error using horzcat
Dimensions of matrices being concatenated are not consistent.

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!