Array changes size every time I run the code
4 次查看(过去 30 天)
显示 更早的评论
Hi,
Im using matlab online and when I am running the code, the size/dimension of the array changes so that I get another error later in the code because the array need to be of a certain size.
The txt file is a array/list of float values with the dimensions: 99600x1. I have check the files in matlab by just opening them there and the dimension is correct there.
The problem is when I am running the code under, that the size of the arrays kx,ky,kz and ecg changes. And its not the same change every time. Sometimes some of the sizes are correct.
Anyone knows what is wrong?
Here is a image of an example. The sizes varies.

This is my code (I have also tried using readtable with a csv file instead):
kx = load("accx_mat_ex.txt");
ky = load("accy_mat_ex.txt");
kz = load("accz_mat_ex.txt");
ecg = load("ecg_mat_ex.txt");
ecgN = ecg/max(ecg);
k = kx+ky+kz;
kN = k/max(k);
whos
回答(1 个)
Cris LaPierre
2022-1-27
编辑:Cris LaPierre
2022-1-27
Please contact support to report this. Be sure to include that this is only happening in MATLAB Online.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Export 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
