Error on spline function
Mostrar comentarios más antiguos
Hi All,
I am new to matlab and am trying to downsample variables with different numbers of samples to a preset number (in this instance 51 points). However, when I use the spline function it keeps coming up with the error below:
>> x = linspace(0, 100, width(Cheesie1));
y = 0:50;
reduced = spline(x, Cheesie1, y);
Error using chckxy
The first and second inputs must be of type double or single.
Error in spline (line 72)
[x,y,sizey,endslopes] = chckxy(x,y);
If anyone can give me an idea as to how to solve this or a better way down downsampling, I would really appreciate it.
Keep well
Mat
3 comentarios
Stephen23
el 5 de Mzo. de 2023
What class is Cheesie1 ? Please show the output of this command:
whos Cheesie1
John D'Errico
el 5 de Mzo. de 2023
My code often smells a bit like limburger, and sometimes it has holes in it like swiss. And on average, it is never as gouda as I want it to be.
Stephen23
el 6 de Mzo. de 2023
"it is never as gouda as I want it to be": I also imagine that it will be a Brie-ze to write some tidy code and can hardly curdle my enthusiasm, yet it always matures into something that is barely Feta than nothing, full of holes, and with quite a strong smell to it.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Interpolation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!