MATLAB Answers

how to loop through a matrix one by one through an entire data and save results

1 view (last 30 days)
Yussif M. Awelisah
Yussif M. Awelisah on 8 Oct 2019
Edited: Stephen Cobeldick on 9 Oct 2019
I am working with the attached code and data but a single matrix works perfectly but refuses to work on my total matrix data of 231 samples.
Each matrix has a size 1 x 500 and the total matrix data has size 231 x 500.
How can I run this data (231 x 500) in my code without errors like( Horzcat or index matrix exceeds dimensions).
Attached is the one matrix data and the total matrix data.
I will be more than grateful for your support.
Yussif M. Awelisah
Yussif M. Awelisah on 9 Oct 2019
I am grateful for your time and concern.
The ideas you gave was considered and applied. The error of ''Index exceeds matrix dimensions occured'' after I looped through and used the logical indexing. I dont know if something is still wrong.
I dont know if my requirement is clear enough. I understand the matrix mismatch is what is causing the error and I want a way I can run the 231 x 500 matrix data using the data attached. The single matrix data works.
I hope you can run both data and understand the error clearer.

Sign in to comment.

Answers (0)


Community Treasure Hunt

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

Start Hunting!