octave-maintainers
[Top][All Lists]
Advanced

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

Re: need test run in recent version of Matlab


From: Alois Schlögl
Subject: Re: need test run in recent version of Matlab
Date: Fri, 1 Mar 2019 07:58:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

On 01.03.19 07:50, John W. Eaton wrote:
> Steps to run:
>
> * unpack attached fhtst.tar.gz
>
> * in Matlab, cd to the fhtst directory, and execute the following
> commands:
>
>   fh = foo ()
>   fh (13)
>   save fhtst.mat fh
>
> * restart Matlab, cd to the fhtst directory, and execute the commands
>
>   load fhtst.mat
>   fh (42)
>
> * post the output from the command window for the two sessions and the
> fhtst.mat file here.
>
> I'm trying to understand scoping of handles to sub functions and also
> what info is available to create a function handle to a sub function
> when the handle is loaded from a .mat file.
>
> Thanks,
>
> jwe
>
>> fh = foo ()

fh =

  function_handle with value:

    @sub

>>   fh (13)

ans =

    'this is sub: 13'

>>   save fhtst.mat fh
>> exit

$ matlab -nodesktop
MATLAB is selecting SOFTWARE OPENGL rendering.

                                                                                
                          
< M A T L A B (R) >
                                                                                
                
Copyright 1984-2018 The MathWorks, Inc.
                                                                                
                
R2018b (9.5.0.944444) 64-bit (glnxa64)
                                                                                
                            
August 28, 2018

 
To get started, type doc.
For product information, visit www.mathworks.com.

>> load fhtst.mat
>>   fh (42)

ans =

    'this is sub: 42'

>

Attachment: fhtst.mat
Description: Binary data


reply via email to

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