Please how can I store values of variable size vectors inside a loop for

조회 수: 2 (최근 30일)
image processing
  댓글 수: 7
Stephen23
Stephen23 2018년 8월 18일
@Mohamed ouahidi: what values does n have? If it is less than three then that loop will not run.
Mohamed ouahidi
Mohamed ouahidi 2018년 8월 18일
I use image 'cameraman.tif' in this case n = 44

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

채택된 답변

Amir Xz
Amir Xz 2018년 8월 18일
" x( idxX(k) + 1 : idxX((k+1)) )" is a vector, so it should store in a vector too.
Use this one:
subH(k,:) = x( idxX(k) + 1 : idxX((k+1)) )';
  댓글 수: 7
Amir Xz
Amir Xz 2018년 8월 19일
Use cell array:
subH{k-1} = x( idxX(k) + 1 : idxX((k+1)) );
Mohamed ouahidi
Mohamed ouahidi 2018년 8월 19일
the problem is solved Thank you so much

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

제품


릴리스

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by