How to clear the error on the code?

11 ビュー (過去 30 日間)
PLACEIUS NISHIGA G
PLACEIUS NISHIGA G 2018 年 2 月 8 日
コメント済み: Pavithra A 2021 年 3 月 15 日
if true
x_of_size_of_U=W;
y_of_size_of_U=L;
U=[ho,E2];
for i=1:n
reshaped_U=reshape(U,x_of_size_of_U,y_of_size_of_U);
end
end
the error is given below
Error using reshape To RESHAPE the number of elements must not change.
Error in fincode (line 227) reshaped_U=reshape(U,x_of_size_of_U,y_of_size_of_U);
  3 件のコメント
PLACEIUS NISHIGA G
PLACEIUS NISHIGA G 2018 年 2 月 14 日
W and L is the size of the image.i.e)256x256
Pavithra A
Pavithra A 2021 年 3 月 15 日
Beam width call function error

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

採用された回答

Birdman
Birdman 2018 年 2 月 8 日
Change the line
reshaped_U=reshape(U,x_of_size_of_U,y_of_size_of_U);
to
reshaped_U=reshape(U,x_of_size_of_U,[]);
or
reshaped_U=reshape(U,[],y_of_size_of_U);
  2 件のコメント
PLACEIUS NISHIGA G
PLACEIUS NISHIGA G 2018 年 2 月 8 日
Thank you sir,I try it .but again it show some error like
Error using reshape Product of known dimensions, 256, not divisible into total number of elements, 65560.
Error in fincode (line 226) reshaped_U=reshape(U,[],x_of_size_of_U); how to clear this?
Birdman
Birdman 2018 年 2 月 8 日
Then you need to choose divisible numbers for your data.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by