MATLAB Answers

0

How to highlight a row in a surface plot?

Latest activity Answered by KSSV
on 4 Feb 2019
Accepted Answer by KSSV
Hello all,
I have done some calculation and in the result i have created a surface plot.
Actually the plot is divided in two separate matrix and i am jus adding them together to form a whole surface plot
How could i show the line of separation. I want to highlight this line in Surface plot and i know the row index.
Please suggest me any function the expected picture can be seen in the attachments.
Thank you

  4 Comments

Show 1 older comment
it is forming some where down. and not at exact point
If you could share the data it would be easy to analyse what’s going on.
its very big with lot of files to be loaded in a program so i cant share it

Sign in to comment.

1 Answer

Answer by KSSV
on 4 Feb 2019
 Accepted Answer

[X,Y,Z] = peaks(100) ;
% seperate here (pick some row randomly)
idx = randsample(100,1) ;
figure
hold on
surf(X,Y,Z) ;
plot3(X(idx,:),Y(idx,:),Z(idx,:),'r','LineWidth',3)

  0 Comments

Sign in to comment.