[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Could someone run the attached on Matlab 2008a
From: |
Søren Hauberg |
Subject: |
Re: Could someone run the attached on Matlab 2008a |
Date: |
Thu, 16 Oct 2008 13:04:55 +0200 |
tor, 16 10 2008 kl. 11:44 +0100, skrev David Bateman:
> Could someone run the script below on Matlab 2008a and send me the
> results (ie the file testhandles.mat)? I still have some doubts about
> what are the return types of certain graphics primitives would like to
> confirm that some of the changes I made for group objects are correct
> before finalizing that part of the code.
When cut'n'pasting your code directly into the matlab prompt I get
>> h = surfc (meshgrid(1:5,1:5));
>> gh_surfc = get(h);
??? Error using ==> get
Objects must all be instances of the same class.
And if I save the script to 'delme.m' and run that from the prompt I get
>> delme
??? Error: File: /net/urd/home/disk10/hauberg/delme.m Line: 60 Column: 4
"gh_plot" was previously used as a variable,
conflicting with its use here as the name of a function or command.
See <a href="matlab: helpview([docroot
'/techdoc/matlab_prog/matlab_prog.map'],'function_call_command_syntax')">MATLAB
Programming, "How MATLAB Recognizes Function Calls That Use Command
Syntax"</a> for details.
Søren
>
> Regards
> David
>
>
> <script>
> 1;
> close all;
> h = area(1:10);
> gh_area = get(h);
>
> close all;
> h = bar(1:10);
> gh_bar = get(h);
>
> close all;
> [c, h] = contour (meshgrid(1:5,1:5));
> gh_contour = get(h);
>
> close all;
> [c, h] = contourf (meshgrid(1:5,1:5));
> gh_contourf = get(h);
>
> close all;
> h = errorbar(1:10,ones(1,10));
> gh_errorbar = get(h);
>
> close all;
> h = plot (1:10);
> gh_plot = get(h);
>
> close all;
> h = quiver(0:10, zeros(1,11), 0:10,-5:5);
> gh_quiver = get(h);
>
> close all;
> h = scatter (rand(1,10), rand(1,10));
> gh_scatter = get(h);
>
> close all;
> h = stairs(1:10,1:10);
> gh_stairs = get(h);
>
> close all;
> h = stem (1:10,1:10);
> gh_stem = get(h);
>
> close all;
> h = surf (meshgrid(1:5,1:5));
> gh_surf = get(h);
>
> close all;
> h = surfc (meshgrid(1:5,1:5));
> gh_surfc = get(h);
>
> close all;
> h = mesh (meshgrid(1:5,1:5));
> gh_mesh = get(h);
>
> close all;
> h = meshc (meshgrid(1:5,1:5));
> gh_meshc = get(h);
>
> save testhandles.mat gh_area gh_bar gh_contour gh_contourf gh_errorbar ...
> gh_plot gh_quiver gh_scatter gh_stairs gh_stem gh_surf gh_surfc ...
> gh_mesh gh_meshc
> </script>
>