- #1
FutureScience
- 10
- 0
Hello everybody!
I'm dealing with a MATLAB script that is made up in this way:
I've this external loop
The aim of this loop is to calcuate a velocity, so at the end I obtain a V_0 of dimension 51x51.
I want to use this V_0 velocity to enter in a matrix where I've other altitude and temperature intervals, which are h_new = 0:1000:10000 and T_new = 0:5:50, and for a velocity vector V_T = 0:13.26:106.08 [m/s], I have the thrust values that you see in this picture:
http://img249.imageshack.us/img249/2285/image1ii.jpg
(Imagine a similar matrix for the other altitude values)
So for any iteration of the external loop, I want to enter with the previously calculated V_0 in the V_T range, and for each value of h_ft and T_0, which have different sizes compared with h_new and T_new, I want the corresponding thrust values for my V_0.
In the end I want to obtain a 51x51 thrust matrix, by interpolating h_new and T_new values, to find the ones for h_ft and T_0.
I've struggled with both interp2 and griddata, without much success, so I'm asking for your help!
Thanks in advance!
I'm dealing with a MATLAB script that is made up in this way:
I've this external loop
Code:
% ALTITUDE [ft]
h_ft = 0:200:10000;
% TEMPERATURE [°C]
T_C = 0:1:50;
for mm = 1:length(h)
for nn = 1:length(T_0)
The aim of this loop is to calcuate a velocity, so at the end I obtain a V_0 of dimension 51x51.
I want to use this V_0 velocity to enter in a matrix where I've other altitude and temperature intervals, which are h_new = 0:1000:10000 and T_new = 0:5:50, and for a velocity vector V_T = 0:13.26:106.08 [m/s], I have the thrust values that you see in this picture:
http://img249.imageshack.us/img249/2285/image1ii.jpg
(Imagine a similar matrix for the other altitude values)
So for any iteration of the external loop, I want to enter with the previously calculated V_0 in the V_T range, and for each value of h_ft and T_0, which have different sizes compared with h_new and T_new, I want the corresponding thrust values for my V_0.
In the end I want to obtain a 51x51 thrust matrix, by interpolating h_new and T_new values, to find the ones for h_ft and T_0.
I've struggled with both interp2 and griddata, without much success, so I'm asking for your help!
Thanks in advance!
Last edited by a moderator: