how to find the inner values between two integer value

1 次查看(过去 30 天)
hello,
facing problem to find the inner values between 2 integer. please have the attached file.
1. at 6am power is 30 and at 7am power is 180.
i want to find the value between 30 and 180 with a timestep 0.05.
like:
6 30
6.05 ???
6.1 ???
6.15 ???
6.2 ???
6.25 ???
6.3 ???
6.35 ???
6.4 ???
6.45 ???
6.5 ???
6.55 ???
6.6 ???
6.65 ???
6.7 ???
6.75 ???
6.8 ???
6.85 ???
6.9 ???
6.95 ???
7 180

采纳的回答

KSSV
KSSV 2021-11-30
t = [6 7] ;
p = [30 180] ;
% interpolation
ti = t(1):0.05:t(2) ;
pi = interp1(t,p,ti) ;
% plot
plot(t,p,'*r',ti,pi,'-b')
legend('original','interpolation')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by