octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: need a test in matlab to implement imformats in Octave


From: Carnë Draug
Subject: Re: need a test in matlab to implement imformats in Octave
Date: Fri, 5 Jul 2013 16:14:51 +0100

On 5 July 2013 16:02, Laurent Hoeltgen <address@hidden> wrote:
> On 07/05/2013 04:50 PM, Carnė Draug wrote:
>>
>> On 5 July 2013 08:22, PhilipNienhuis <address@hidden> wrote:
>>>
>>> Carnė Draug-4 wrote
>>>
>>>> Hi
>>>>
>>>> could someone with matlab run a test for me in. I'm trying to
>>>> understand how the image IO functions work after messing up with
>>>> imformats. The test is the following:
>>>>
>>> This contains quite a bit of invalid ML syntax. [...]
>>
>> Sorry. I always get caught in Octave's incompatibility bugs. It's not
>> like Octave changes that fast, Mathworks should have already fixed
>> this by now :p
>>
>>> Error using testreadjpg
>>> Too many output arguments.
>>>
>>> Error in imread (line 415)
>>>      [X, map] = feval(fmt_s.read, filename, extraArgs{:});
>>>
>>> ... so I think testreadjpg.m contains additional errors. It doesn't even
>>> get
>>> called as there's no 'im initialized' message.
>>
>> Could you please try again and define testreadjpg as
>>
>> function [out, m] = testreadjpg (filename)
>>    persistent im;
>>    if (isempty (im)); im = 1; fprintf ('im initialized\n'); end
>>    disp (im)
>>    if (im > 3), error ('stuck in a loop\n'); end
>>    im = im + 1;
>>    [out, m] = imread (filename);
>> end
>>
>>  From their documentation, the test should either print 1, 2, 3 and
>> then give an error, or return the image. Unless, there's another
>> interpretation that I'm missing :(
>>
>> Thank you,
>> Carnė
>
> Hi,
>
> Matlab R2012a output:
>
> [...]

Thank you. This solves my problem.

Carnë


reply via email to

[Prev in Thread] Current Thread [Next in Thread]