Error in readtable function.
Mostrar comentarios más antiguos
I was given a .csv file of data and exported it to a .xlsx file to my desktop. My matlab code now will not read the table and i am unsure why. I have attached the file to this question as well. i had run into an issue earlier where if i had the same file open more than once the code would not run. I closed everything and started matlab back up and this code will still not run. Im sure this is probably an easy fix as this is my second week using matlab and I am still learning the ins and outs. Thanbk You!
my code is as follows:
Y2 = readtable('1hz000.xlsx','Range','E1:AJ12');
oneHZ = table2array(Y2);
two = detrend(oneHZ);
for i=1:32
[pks] = findpeaks(one(:,i));
meanWH(i) = mean(pks);
end
mn1 = mean(meanWH);
WH2 = mn1*2
3 comentarios
GOPIKA
el 4 de Nov. de 2024
Error in realtime_data (line 3)
data = readtable(realtime_data,'A1:BJ68'); % Using readtable for modern MATLAB versions
Cris LaPierre
el 6 de Nov. de 2024
Editada: Cris LaPierre
el 6 de Nov. de 2024
Please share the entire error message (all the red text) along with the value of your variable realtime_data.
Walter Roberson
el 6 de Nov. de 2024
You named your function or script realtime_data the same as a variable within the function or script. That would lead to MATLAB attempting to call the script or function itself at that point, which is likely to fail.
You need to avoid naming your function or script the same as a variable you use in the function or script.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Spreadsheets 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!