Matlab issue in Ubuntu 12.04

I have just installed Ubuntu 12.04 and tried the following Matlab code
sdirectory = '/home/user/Work/Hari';
tifffiles = dir([sdirectory '/*.jpg']);
for k = 1:length(tifffiles)
filename = [sdirectory '/' tifffiles(k).name];
I = imread(filename);
end
Here, I am trying to do some operations on the .jpg images stored in the folder /home/user/Work/Hari. But, when executing this program. its giving no output. But, not giving any error.
When tried to see the pixel values in I, its giving the error - ??? Undefined function or variable 'I'.
What will be the problem ? How can I solve this issue ?

1 Comment

Please recheck sdirectory. Should it be /home/user/Hari/Work or perhaps /home/users/Hari/Work ?

Answers (0)

This question is closed.

Asked:

on 20 Jul 2012

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!