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

4 Ansichten (letzte 30 Tage)
image processing
  7 Kommentare
Stephen23
Stephen23 am 18 Aug. 2018
@Mohamed ouahidi: what values does n have? If it is less than three then that loop will not run.
Mohamed ouahidi
Mohamed ouahidi am 18 Aug. 2018
I use image 'cameraman.tif' in this case n = 44

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Amir Xz
Amir Xz am 18 Aug. 2018
" 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 Kommentare
Amir Xz
Amir Xz am 19 Aug. 2018
Use cell array:
subH{k-1} = x( idxX(k) + 1 : idxX((k+1)) );

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by