Re: Which name will be returned when forcing load function to treat the fig-file as a MAT-file?



Steve Simon wrote:
>
>
> Tsai wrote:
>> when I use
>>
>> load('-mat', 'figure-file-name.fig')
>>
>> to load a figure file by forcing the figure file treated
>>
>> as a MAT-file, regardless of file extension FIG.
>>
>> It returns a structure variable named "hgS_070000" for MATLAB
> R14SP2.
>>
>> Could someone please tell me, whether the variable name is
> dependent
>> on the MATLAB version and how would it be specified for
different
>> versions (R14, R14SP1,R14SP2 and R14SP3)?
>
> Why not just specify an output from LOAD:
>
> S = load('-mat','figure-file-name.fig');
>
> It will still have the name as a field name, but it should be the
> only
> field, so you could do something like this:
>
> fn = fieldnames(S);
> figVar = getfield(S,fn{1}); % or figVar = S.(fn{1});
>
> Now you have the contents of the variable, and it doesn't matter
> what
> the original name was.
>
> -Steve Simon
>

Thanks a lot, Steve.

I have used the EVAL function to create a new structure which saves
the same contents as the output from LOAD. And the new structure has
exactly the field name, for example, hgS_070000.

my current question is, that after online Product Support
1103 Functions which use the EVAL function cannot be translated into
C or C++ code using the MATLAB Compiler.

But I have successfully compiled my code using Microsoft Visual C/C++
..NET Compiler under R14SP1 and R14SP2.

Does it mean that this Compiler supports the compilation of EVAL
function?

Is there a risk which causes potentially errors?

Thanks!


Tsai
.



Relevant Pages

  • Re: Which name will be returned when forcing load function to treat the fig-file as a MAT-
    ... Tsai wrote: ... It returns a structure variable named "hgS_070000" for MATLAB ... 1103 Functions which use the EVAL function cannot be translated into ... Does it mean that this Compiler supports the compilation of EVAL ...
    (comp.soft-sys.matlab)
  • Re: Which name will be returned when forcing load function to treat the fig-file as a MAT-fi
    ... Steve Simon wrote: ... > Tsai wrote: ... >> 1103 Functions which use the EVAL function cannot be translated ... >> Does it mean that this Compiler supports the compilation of ...
    (comp.soft-sys.matlab)
  • VS.NET quirks and rants
    ... The March Hare [MVP] wrote: ... >> to load VS 7 but your solution sounds like a better route. ... I like the compiler in VS.NET. ... strays into a VS.NET window when focus-follows-mouse is on is BLOODY ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Library bug or my fault?
    ... The compiler is allowed to assume that p2 (which can only correctly ... point to an actual instance of a "struct Bar") is 4-byte aligned, ... store two bytes to first two bytes of "bar" ... load third byte from address given by p2+2 ...
    (comp.lang.c)