For the original CW16.jpg, then reshape(w1,128,2) works for me as w1 does have exactly 256 elements, as the img is 16 x 16.
However, unknown.jpg is 562 by 1679 and so has no chance of being reshaped to 128 x 2. If you were to try to resize it to 16 x 16 first, it would be unreadable.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
13 Comments
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888158
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888158
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888215
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888215
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888690
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888690
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888692
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888692
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888698
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888698
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888701
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888701
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888710
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888710
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888881
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888881
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888899
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888899
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888902
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_888902
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_889133
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_889133
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_889166
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_889166
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_889301
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/544127-hello-every-one-i-am-a-newbie-i-have-a-error-how-can-i-fix-it#comment_889301
Sign in to comment.