# MATLAB: How to reduce dimension of griddedinterpolant

girdded dataMATLAB

I have a gridded efficiency map where each point depends on different input values for current and voltage.
``F = griddedInterpolant(x_voltage,y_current,eff_map)% and query points eff = F(voltage_set,current_set)``
Now I want to convert this map while runtime of a program to a curve for a fixed voltage, so that the efficiency just depends on the current/power.
Kind of,
``function new_F = reduceDimension(F,fixed_voltage)    ...endeff = new_F(power_set)``
I can't find a quick solution, maby someone has an idea.
THX

• ``whos  Name             Size               Bytes  Class     Attributes  eff_map        500x500            2000000  double                x_voltage      500x500            2000000  double                y_current      500x500            2000000  double       ``
``F = griddedInterpolant(x_voltage,y_current,eff_map)``
``FixedVolts = 42;F_v42 = @(y) F(repmat(FixedVolts,size(y)),y);``
``F_v42(17)ans =         0.881963765526607         F_v42([1 3 5])ans =        0.0952082740655224         0.230322190630928         0.381508409480828         fplot(F_v42,[0,50])xlabel 'y_current'ylabel 'eff_map @ x = 42'``