How to mesh(peaks)

% Actual Data
Zh = [40.8,41.1,41.4;40.7,41,41.6;40.7,41.1,41.3]
Zt = [24.6,24.4,24;24.7,24.3,24;24.6,24.1,23.9]
[X,Y] = ndgrid([15,30,45],[15,30,45]);
% Interpolation
Fh = griddedInterpolant(X,Y,Zh,'linear');
[Xnew,Ynew] = ndgrid(0:55,0:55);
Zhnew = Fh(Xnew,Ynew)
Ft = griddedInterpolant(X,Y,Zt,'linear');
Ztnew = Ft(Xnew,Ynew)
mesh(Xnew,Ynew,Zhnew,Ztnew);
How to mesh(peaks) this by preserving the color matrix?

4 Comments

Are you referring to the peaks() routine, http://www.mathworks.com/help/matlab/ref/peaks.html ? If not then what does "peaks" refer to here?
Flashbond
Flashbond on 24 Aug 2013
Yes, I do refer that. But I don't know the exact command to handle this.
I do not understand yet what you want to do. peaks() has a built-in function that it works with, and all you can change with it is the size of the sampling array or the set of points that the built-in function is sampled at. Is that what you want to do, use that arbitrary built-in function in connection with your own data? Or are you wanting to locate the peaks of your data? peaks() does not do that; there is a routine in the Signal Processing Toolbox, findpeaks() that can be useful for that.
Flashbond
Flashbond on 24 Aug 2013
Maybe I didn't understand what is peaks exactly. I think it is not the thing that I thought.

Answers (0)

This question is closed.

Products

Asked:

on 24 Aug 2013

Community Treasure Hunt

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

Start Hunting!