Borrar filtros
Borrar filtros

Find the points of the curve

1 visualización (últimos 30 días)
mohammad
mohammad el 1 de Nov. de 2022
Editada: Voss el 1 de Nov. de 2022
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]

Respuesta aceptada

Voss
Voss el 1 de Nov. de 2022
Editada: Voss el 1 de Nov. de 2022
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')

Más respuestas (0)

Categorías

Más información sobre Scatter Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by