Error using resample. You must specify the down-sampling parameter Q in conjunction with the up-sampling parameter P.

I am trying to upsample a signal with a 100 Hz sampling rate to a 1926 Hz sampling rate. This is my code, but I keep getting the error 'You must specify the down-sampling parameter Q in conjunction with the up-sampling parameter P.'
clear
clc
close all
filename = 'some filename';
T = readtable(filename);
B=T(:,3);
BResampled = resample(B, 1926, 100);
writematrix(BResampled,'some filename.xlsx','Sheet',1,'Range','D2')

 Accepted Answer

T = readtable(filename);
T will be a table() object.
B=T(:,3);
When you use () indexing with a table() object, the result is a table() object.
BResampled = resample(B, 1926, 100);
You are asking to resample() a table object.
Now if you uad used T{:,3} ...

More Answers (0)

Community Treasure Hunt

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

Start Hunting!