Filling up a matrix using loop

I have an output matrix that I need to fill. Every time I run the loop a row has to be fixed. I know my coloumn size which is 3. If I give an excess row number and fill the matrix with zeros i.e. R = zeros (1000,3) and run my code, there seems to be an error in the computation process. If I give a lower value, it does compute, but it stops much earlier than when it is supposed to stop. Say I actually have 333.1 rows which I convert to 334. When I give 334 as dimension to rows, I get an error in my computation. When I give 310, my program stops at say 306th iteration. This seems a unique error. Help on this would be appreciated.

댓글 수: 1

Björn
Björn 2012년 10월 15일
Can you give an example of your code?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

질문:

2012년 10월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by