Index in position 1 exceeds array bounds.

hello,
i have error in matlab code
Index in position 1 exceeds array bounds.
Error in dwt_haar (line 16)
X=X(1:256,1:256);

Answers (1)

Notice!
x=rand(5,500);
x=x(1:256,1:256);
Index in position 1 exceeds array bounds (must not exceed 5).

4 Comments

Hazhar Ahmed's comment moved here:
thnk you for reply but the error is
Index in position 1 exceeds array bounds (must not exceed 5).
Matt J
Matt J on 18 Feb 2021
Edited: Matt J on 18 Feb 2021
Yes, it is purposefully the same error message. You should see from my example why the error occurs.
X=imread('tumor.jpg');

Sign in to comment.

Asked:

on 17 Feb 2021

Edited:

on 19 Feb 2021

Community Treasure Hunt

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

Start Hunting!