Help with Data Plotting - Surface Plot from known M-by-1 and N-by-1 matrices
2 views (last 30 days)
I have a physical quantity - Induced Voltage (V) as a function of two independent variables - Electric field (E) and Temperature (T). V is NOT known as a mathematical function of E and T, i.e. not in the form V = f(E,T) where the function f is known mathematically. But through certain numerical computations, I know how V varies with E and T (separately).
1.e. for E = 1:1:600, I know the corresponding V as a 600-by-1 vector (say V1), and with T = 1:1:200, I know the corresponding V as a 200-by-1 vector (say V2).
These two matrices V1 and v2 are arising from separate programs, but I've exported them and now, they are available as separate .dat files, which can be conveniently imported.
Separate plots for (V vs E) and (V vs T) are possible and I've realized them, my question is - is it possible to represent this using a surface plot, where E becomes the z-axis of the plot, and E and T are the X- and Y-axes respectively ?
Remember - (possible complications) - 1) The matrices have separate sizes - 200-by-1 and 600-by-1, so my x and y axes are ... varying to different extents. 2) Because there is no mathematical form, I know V only at 200 and 600 points respectively. (I am not averse to interpolation, but if that can be avoided, that would be preferable)
Sulimon Sattari on 21 May 2013
Yes, you can but. You must use your two data sets to create a 200X600 matrix, and do a surface with T, E, and the 200X600 matrix. meshgrid is very useful for this. Here's an example:
T = 1:200;
V1 = rand(1,200);
V2 = rand(1, 600);