Re: Try-catch error in Matlab version 7.4
- From: "Kaite " <kweider@xxxxxxxxxxxxx>
- Date: Fri, 7 Aug 2009 17:48:01 +0000 (UTC)
THANKS!
"Vadim Teverovsky" <vteverov@xxxxxxxxxxxxx> wrote in message <h5ho3v$co1$1@xxxxxxxxxxxxxxxxxx>...
You are trying to use a syntax which was introduced in R2007b in an earlier.
version.
In R2007a, the catch syntax with a variable did not yet exist, although
there was the warning you are seeing which warned of its impending
introduction.
In R2007a, you need to replace the catch block with:
catch
disp(lasterror);
end
"Kaite " <kweider@xxxxxxxxxxxxx> wrote in message
news:h5hnrq$q56$1@xxxxxxxxxxxxxxxxxxxxx
I am trying to fix a try-catch syntax in an m-file...the error message
reads:
??? Warning: File: lowess.m Line: 297 Column: 11
This try-catch syntax will continue to work in R2007a,
but may be illegal or may mean something different in future releases of
MATLAB.
See Release Notes for MATLAB Version 7.4, "Warning Generated by try-catch"
for details.
although it says that it will continue to work I am not getting any
results....I would like to know hoe to fix it... this is the portion of
the m-file that has the try-catch issue....I tried to read the release
notes and fix it but i cant seem to get it to work....this is a known bug
in the 7.4 (R2007a) version......
function customplot(lws,uplmt,lwrlmt,f,imgfile)
% Plotting of data and lowess regression line
try
x = lws(:,1);
y = lws(:,2);
yh = lws(:,3);
plot(x,y,'d');
hold on
plot(x,yh, 'r-', 'LineWidth',2);
x = uplmt(:,1);
yh = uplmt(:,2);
plot(x,yh, 'r:', 'LineWidth',2);
x = lwrlmt(:,1);
yh = lwrlmt(:,2);
plot(x,yh, 'r:', 'LineWidth',2);
grid on
xlabel('x-values')
ylabel('y-values')
ts = strcat('LOWESS Regression plot f=',num2str(f));
title(ts)
hold off
if ~isempty(imgfile)
fprintf('\nCreating plot. Give a few tics.\n');
print('-dpng','-r600', imgfile);
fprintf('\nFinished...\n');
end
catch ME1
disp(ME1)
end
end
thanks!
- References:
- Try-catch error in Matlab version 7.4
- From: Kaite
- Re: Try-catch error in Matlab version 7.4
- From: Vadim Teverovsky
- Try-catch error in Matlab version 7.4
- Prev by Date: Re: Help! Autocorr starting point
- Next by Date: G input and crosshairs
- Previous by thread: Re: Try-catch error in Matlab version 7.4
- Next by thread: lsqcurvefit optimization terminated
- Index(es):
Relevant Pages
|
Loading