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

Make sure you give correct sizes. Given that you arbitrarily assign W and L to your size elements, which we have no clue what they are, we can't really say anything more than that.
x_of_size_of_U * y_of_size_of_U
should be equal to
numel( U )
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일

0 개 추천

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

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개)

카테고리

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

태그

질문:

2018년 2월 8일

댓글:

2021년 3월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by