How do I evaluate interpolated data at unique points provided by two other matrices?

1 view (last 30 days)
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
Ross
Ross on 22 Aug 2013
>> TQMAP(1:5,1:5)
ans =
12.8081 38.4337 64.0589 89.6844 115.3099
13.5579 40.6834 67.8087 94.9342 122.0598
14.4951 43.4956 72.4959 101.4965 130.4971
15.3073 45.9329 76.5582 107.1838 137.8094
16.0570 48.1827 80.3080 112.4336 144.5593
>> SPDMAP(1:5,1:5)
ans =
2450 2450 2450 2450 2450
2350 2350 2350 2350 2350
2250 2250 2250 2250 2250
2150 2150 2150 2150 2150
2050 2050 2050 2050 2050
TQMAP has unique values because the columns are based on torque percentage, 100% torque at 1600 RPM is much greater than 100% torque at 800 RPM. The rows of TQMAP are with respect to RPM, which is constant across the rows. For example, TQMAP(1,1) would be 2.5% of the maximum torque at 2450 RPM, and TQMAP(2,1) would be 2.5% of the maximum torque at 2350 RPM. Wheras TQMAP(1,2) would be 7.5% of the maximum torque at 2450 RPM. There are 23 columns of torque percentages, and 25 rows of speeds.
SPDMAP is created via meshgrid because the the row values are constant, but in the case of TQMAP, I already have every value in matrix format. I need to evaluate my triscatteredinterp data (which is based on speed and load) to this different set of speed and load values contained within TQMAP(i,j) and SPDMAP(i,j).
dpb
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.

Sign in to comment.

Answers (0)

Categories

Find more on Interpolation 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!