フィルターのクリア

Why is blockproc giving errors ?

3 ビュー (過去 30 日間)
Fego Etese
Fego Etese 2020 年 4 月 26 日
コメント済み: Fego Etese 2020 年 4 月 26 日
I am trying to do a block processing operation but it keeps on giving me errors on running the code. Please help me.

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 4 月 26 日
Change following lines in you code function getAvgGradient().
1. blksize is a 1x2 array. zeros() can only accept a scalar as input
GxData = zeros(blksize(1)^2, 1);
GyData = zeros(blksize(1)^2, 1);
GsxData = zeros(blksize(1)^2, 1);
GsyData = zeros(blksize(1)^2, 1);
2. In MATLAB, the index start from 1
for row = 1:size(mag, 1) % change from 0 to 1
for col = 1: size(mag, 2) % change from 0 to 1
  16 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 4 月 26 日
編集済み: Ameer Hamza 2020 年 4 月 26 日
Yes, you can start a new question. This is not related to the current question, so any discussion here cannot be fruitful for anyone else in the future. You can comment the link of the question so that i will get a notification.
Fego Etese
Fego Etese 2020 年 4 月 26 日

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by