Path: news.mathworks.com!not-for-mail
From: "Serkan " <serkanvai@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to check if a parameter is already in workspace
Date: Tue, 30 Jun 2009 17:42:01 +0000 (UTC)
Organization: Cologne University of Applied Sciences
Lines: 16
Message-ID: <h2dip9$hh5$1@fred.mathworks.com>
References: <h2bggl$3rs$1@fred.mathworks.com> <h2bhel$3c3$1@fred.mathworks.com>
Reply-To: "Serkan " <serkanvai@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246383721 17957 172.30.248.37 (30 Jun 2009 17:42:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 30 Jun 2009 17:42:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1884605
Xref: news.mathworks.com comp.soft-sys.matlab:551770


Hi
how can i use "exist" in the M-Function of my GUI

        case 'PB_STARTSIM'
            Check = evalin('base',(char(exist('Uk','var'))));
            if Check == 1;
                open model;                
                evalin('base','sim model');
            else
                errordlg('Please load the parameters at first','Error');
            end

I have in the GUI a start simulation button. Before starting the simulation though i need to check if Uk is already in Workspace. If so 'model.mdl' will be opened and simulation will be started. But it doesnt work somehow.
if you can help i would very appreciate
greetings
serkan ozturk