Change of variable to plot

Hello everybody and thanks in advance!
I don't know how to face this problem: I have 2 variables, "i_n" and "e_b", that are vectors, and 3 functions of this 2 variables, "h" "v" and "m", that are, of course, matrices with the sizes of the vectors "i_n" and "i_b".
I want to do a 3d plot of "h" "v" and "m" but i don't really know how to do it. Thought something like: i define "H" and "V" as vectors than i search for each value of the vectors the nearest values in "h" and "v", take the indices and, if for both "h" and "v" they coincide then i take that value on "m".
Do you think this could work? Any other ideas?
Thanks, Fabrizio

1 Comment

Is there any reason you cannot use the following?
plot3(h,v,m);

Sign in to comment.

Answers (1)

I am not certain what you want to do.
Experiment with this:
i_n = 1:10; % Create Data
e_b = 101:112; % Create Data
rsz = length(i_n); % Create Data
csz = length(e_b); % Create Data
h = randi(9, rsz, csz); % Create Data
v = randi([15 20], rsz, csz); % Create Data
m = randi([30 40], rsz, csz); % Create Data
figure(1)
surf(i_n, e_b, h')
hold on
surf(i_n, e_b, v')
surf(i_n, e_b, m')
hold off
grid on

Tags

Asked:

on 7 Dec 2016

Commented:

on 7 Dec 2016

Community Treasure Hunt

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

Start Hunting!