Find the points of the curve

1 次查看(过去 30 天)
What should be done to convert these 24 points to 48 points so that the output curve is the same
base=[2450,2350,2250,2000,1800,1600,1550,1450,1600,1800,2000,2200,2400,2450,2400,2300,2350,2200 2300 2350 2300 2300 2250 2000]

采纳的回答

Voss
Voss 2022-11-1
编辑:Voss 2022-11-1
base = [2450,2350,2250,2000,1800,1600,1550,1450,1600,1800,2000,2200,2400,2450,2400,2300,2350,2200 2300 2350 2300 2300 2250 2000];
n = numel(base);
x = 1:n;
plot(x,base,'b.-')
hold on
second_x = linspace(1,n,2*n); % 48 points
second_base = interp1(1:n,base,second_x);
plot(second_x,second_base,'ro')
I think using 47 points makes more sense:
figure()
plot(x,base,'b.-')
hold on
third_x = linspace(1,n,2*n-1); % 47 points
third_base = interp1(1:n,base,third_x);
plot(third_x,third_base,'ro')

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by