From: Arie Driga on
Hi!

I tried to read and present a picture in matlab. The picture itself was created using adobe illustrator and then I saved it in tif format.

When I tried to use 'imread', the following error message appears:
>> imread(Calculation_1.tif)
??? Attempt to reference field of non-structure array

And when I tried to directly use imshow, the following error message appears:
>> imshow(Calculation_1.tif)
??? Attempt to reference field of non-structure array.

What has gone wrong here?
The picture is quite big, the size is 3617x2329
But, I did tried to cut the picture and re-save it using paint, and still the same error messages appear.
From: Nathan on
On Feb 12, 4:50 pm, "Arie Driga" <a_dr...(a)yahoo.com> wrote:
> Hi!
>
> I tried to read and present a picture in matlab. The picture itself was created using adobe illustrator and then I saved it in tif format.
>
> When I tried to use 'imread', the following error message appears:>> imread(Calculation_1.tif)
>
> ??? Attempt to reference field of non-structure array
>
> And when I tried to directly use imshow, the following error message appears:>> imshow(Calculation_1.tif)
>
> ??? Attempt to reference field of non-structure array.
>
> What has gone wrong here?
> The picture is quite big, the size is 3617x2329
> But, I did tried to cut the picture and re-save it using paint, and still the same error messages appear.

The problem here is that you are telling matlab that you have a
structure called Calculation_1 with a substructure called tif, and
want to use imshow to somehow display this structure.
I think what you want to do is put single quotes around
Calculation_1.tif (assuming that this is actually your file name).

Try doing:
A = imread('Calculation_1.tif')
to read in your image
and
imshow(A)
or
imshow(A,[])
to display your image.

Note: In order for Matlab to read your file, it must be on the matlab
path or in your current directory, unless you give an absolute file
name to imread()

I hope this helps clear things up.

-Nathan