How do I evaluate interpolated data at unique points provided by two other matrices?
Show older comments
I have calculated thermocouple data as [174x1] vectors. I then used
Int_Thermocouple=triscatteredinterp(Engine_Speed,Engine_Torque,Thermocouple)
to make the thermocouple data a linear function of speed and torque.
I have a matrix Torque_Map [25x23] that has unique torque values in each cell, each row is calculated with respect to a different engine speed.
I used Speed_Map = meshgrid(Engine_Speed) and then resized it to [25x23] so that Torque_Map would have a matrix of the same size containing the corresponding engine speeds for each point within Torque_Map.
Now, here's where I'm having the problem.
I want to evaluate the thermocouple data at the unique speed and load points provided by Torque_Map and Speed_Map.
I've tried
output = Int_Thermocouple(Speed_Map,Torque_Map);
but this fails. How can I evaluate the thermocouple data at every point within Torque_Map and Speed_Map?
5 Comments
Would seem what you need is
[t,r]=meshgrid(torque,rpm); % over the range of torques and speeds desired
T=int_Thermocouple(t,r); % the interpolated temps
Ross
on 21 Aug 2013
I guess I'm cornfoozed...if I understand correctly you've got a table of rpm and torque independent variables w/ observed temp's at those locations.
If I make up a smaller example like
>> sp=1000:250:1500 % three speeds
sp =
1000 1250 1500
>> t=1300:125:1700 % four torques
t =
1300 1425 1550 1675
>> [S,T]=meshgrid(sp',t)
S =
1000 1250 1500
1000 1250 1500
1000 1250 1500
1000 1250 1500
T =
1300 1300 1300
1425 1425 1425
1550 1550 1550
1675 1675 1675
>>
then the resulting mesgrid arrays are the combination of those 3-by-4 points. Wouldn't those be the points at which you want the interpolant?
ADDENDUM
Well, it dawns on me that isn't right, either but that I don't understand the 25x23 table. What is the variable w/ dimension 23?
ADDENDUM 2:
How about posting a very small subset of the data as an example for to use for experimentation/visualization.
Ross
on 22 Aug 2013
dpb
on 22 Aug 2013
OK, it's so much easier when can visualize the data to think about it....could you also add a sample of the TC data that can fit--I've not used the triscattered data fitter previously so need an example to play with -- might as well be actual numbers/sample space commensurate w/ your actual problem.
Answers (0)
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!