Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

How to add some value between two datas in an array?

1 vue (au cours des 30 derniers jours)
Madania Nia
Madania Nia le 26 Fév 2020
Clôturé : MATLAB Answer Bot le 20 Août 2021
i want to ask how to put some value between two datas like "interp" function. its because "interp" function only work for at least 9 input datas.
i want to do something like "interp" function but with just 2 input datas
for example
i have A=[1 2]
then become A1=[1 1.5 2 2.5]
  2 commentaires
KSSV
KSSV le 26 Fév 2020
A1 = [1 1.5 2]
The above canbe done using interp1 and the result is trusted. This ocmes under inteprolation.
A1=[1 1.5 2 2.5]
The above can alos be done using interp1 but the result for 2.5 cannot be trusted, as it comes under extrapolation.
Rik
Rik le 26 Fév 2020
If you want a linear interpolation you could use polyfit (or just determine the coefficients yourself).

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by