Path: news.mathworks.com!not-for-mail
From: "AHMET ANIL DINDAR" <adindar@iku.edu.tr>
Newsgroups: comp.soft-sys.matlab
Subject: Re:
Date: Fri, 18 Jul 2008 15:52:02 +0000 (UTC)
Organization: Istanbul Kultur University
Lines: 25
Message-ID: <g5qe72$61r$1@fred.mathworks.com>
References: <g5j7ua$s3u$1@fred.mathworks.com> <g5j8m9$94v$1@canopus.cc.umanitoba.ca> <g5k3v3$ruc$1@fred.mathworks.com> <g5k8oa$al3$1@fred.mathworks.com>
Reply-To: "AHMET ANIL DINDAR" <adindar@iku.edu.tr>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1216396322 6203 172.30.248.35 (18 Jul 2008 15:52:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 18 Jul 2008 15:52:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 389985
Xref: news.mathworks.com comp.soft-sys.matlab:480300



Dear Rodney,
What you adviced me was what I exactly I was looking for.

Thank you for your help.

greetings from Istanbul.

aad

%%% try-catch example %%%
the example code
clc,clear,close all
a=1:1:10;
try
    counter=1;
    for i=1:length(a)
        ali(counter,1)=a(i,1);
        counter=counter+1;
    end
    plot(ali)
catch
    adem=lasterror ;
    disp(adem.message)
end
%%% thanks rodney %%%