Effacer les filtres
Effacer les filtres

i have two tables, 1table is for power and other one is for area, if do have data in table 1

1 vue (au cours des 30 derniers jours)
i have two tables, 1table is for power and other one is for area, if I do have data in table 1 how would i know the equivalent value on that number to table 2? table 1 ranges 700-800 and table2 ranges 100-300..
TABLE same as here
POWER(700-800) AREA(100-300)
800 300
799 299
798 298
... ....
... ...
down to 1 down to 1

Réponse acceptée

C.J. Harris
C.J. Harris le 23 Déc 2011
You could use one of Matlab's interpolation functions. Just ensure that your power and area tables are the same size. See:
doc interp1
Example:
mPower = [700 750 800];
mArea = [100 200 300];
mInputPower = 720;
outputArea = interp1(mPower, mArea, mInputPower);
  4 commentaires
john john
john john le 10 Jan 2012
i got a new problem now, if ever i get a decimal result like 701.2,703.2 or any decimal value? can interp handle that?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by