Hi there,
I'm building a GUIDE, where I use some popupmenus to chose some specs. like the day and some paths, and save them as .mat in a temporary folder.
In another popupmenu I use those like this:
switch get(handles.VARIAVEL,'Value')
case 2
set(handles.STATUS,'String','Loadding Variable ...');
load temp/dia.mat; %string
dia
load temp/lev.mat; %number
load temp/path1.mat; %string
load temp/path2.mat; %string
out1 = netcdf([ path1 'wrfout_d03_2010-07-' num2str(dia) '_00_00_00']);
out2 = netcdf([ path1 'wrfout_d03_2010-07-' dia '_12_00_00']);
..
..
..
But I'm never able to get the output of these commands.....
ERROR:
??? Undefined function or method 'ncid' for input arguments of type 'double'.
Error in ==> netcdf.netcdf at 432
if ncid(result) >= 0
Error in ==> alq_guide>VARIAVEL_Callback at 226
out1 = netcdf([ path1 'wrfout_d03_2010-07-' num2str(dia) '_00_00_00']);
Error in ==> gui_mainfcn at 96
feval(varargin{:});
Error in ==> alq_guide at 42
gui_mainfcn(gui_State, varargin{:});
Error in ==>
@(hObject,eventdata)alq_guide('VARIAVEL_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback
Is there any way of making it reconstruct the path and file to open?
|
|
0
|
|
|
|
Reply
|
João
|
1/14/2011 8:58:04 PM |
|
On Jan 14, 3:58=A0pm, "Jo=E3o Teixeira" <jcm...@gmail.com> wrote:
> Hi there,
> Is there any way of making it reconstruct the path and file to open?
----------------------------------------------------------
Why don't you try using sprintf() to build up your base file name, and
then fullfile() to prepend the path to it? And then use exist() to
check on its existence before you try to read it.
|
|
0
|
|
|
|
Reply
|
ImageAnalyst
|
1/15/2011 2:24:21 AM
|
|