Attempted to access data1(:,1); index out of bounds because size(data1)=[0,0].

  • Thread starter Thread starter Engiman
  • Start date Start date
  • Tags Tags
    Bounds Index
AI Thread Summary
The error "index out of bounds because size(data1)=[0,0]" indicates that MATLAB is not recognizing the data input correctly, likely due to an issue with the data format or loading process. The code works with 6 columns but fails with 8, suggesting a potential problem with how the data is structured or accessed. The suggestion to attach the code aims to identify specific issues in the implementation. Ensuring that the data is correctly loaded and formatted is crucial for resolving this error. Proper debugging and verification of data dimensions will help in addressing the problem effectively.
Engiman
Messages
1
Reaction score
0
Hi,
I am running a code in MATLAB process 8 columns and over 500 rows of data but i get the above error.
With 6 columns, the code works well. Your help is important.
 
Engineering news on Phys.org
It sounds like its not understanding your data since it says the size is [0,0] when it should be [500,8]. Could you attach the code?
 
I have Mass A being pulled vertically. I have Mass B on an incline that is pulling Mass A. There is a 2:1 pulley between them. The math I'm using is: FA = MA / 2 = ? t-force MB * SIN(of the incline degree) = ? If MB is greater then FA, it pulls FA up as MB moves down the incline. BUT... If I reverse the 2:1 pulley. Then the math changes to... FA = MA * 2 = ? t-force MB * SIN(of the incline degree) = ? If FA is greater then MB, it pulls MB up the incline as FA moves down. It's confusing...
Hi. I noticed that all electronic devices in my household that also tell time eventually lag behind, except the ones that get synchronized by radio signal or internet. Most of them are battery-powered, except my alarm clock (which runs slow as well). Why does none of them run too fast? Deliberate design (why)? Wrong temperature for quartz crystal? Decreasing battery voltage? Or just a coincidence?

Similar threads

Replies
4
Views
6K
Replies
11
Views
3K
Replies
1
Views
2K
Replies
2
Views
2K
Replies
3
Views
3K
Replies
3
Views
3K
Back
Top