Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
errors using matlab script that don't occur when running in gui
Posted 23.10.2009, 17:58 GMT-4 1 Reply
Please login with a confirmed email address before reporting spam
Hi,
I am running a simulation which couples 2 odes and 2 pdes together in a simple 1 dimensional mode. The simulation requires the two stages are simulated sequentially. In the first stage the temperature is a constant variable. The second stage then uses the final conditions from the initial stage as the ICs and has the temperature T activated as an application mode where I specify the dT/dt=constant and elimate the constant value T.
The simulation ran fine until I began implementing my own matlab functions as scalar expressions. When I add them and run the simulation in the gui, there are no problems. When I save the simulation as a mfile script and try running it in the matlab workspace i get errors in between the saving the conditions of the first stage and running the second stage. The error is as follows:
-------------------------------------------------------------
??? Java exception occurred:
Exception:
com.femlab.server.MlError: Error using ==> rdivide
Matrix dimensions must agree.
(rethrown as com.femlab.jni.FlNativeException)
Messages:
Error using ==> rdivide
Matrix dimensions must agree.
Error in callback
Stack trace:
at callback.cpp, row 113, ()
at com.femlab.solver.FlSolver.femTime(Native Method)
at com.femlab.solver.FemTime.run(SourceFile:69)
at com.femlab.server.FlRunner.run(SourceFile:120)
at com.femlab.server.MlProgressDlg.runAndWait(SourceFile:142)
at com.femlab.server.FlRunnable.runAndWait(SourceFile:69)
Error in ==> femsolver at 225
solobj.runAndWait(report, 'Solution Progress', loopTime);
Error in ==> femtime at 61
varargout = femsolver(mfilename,'FemTime',varargin{:});
Error in ==> testfunctioninput2 at 389
fem.sol=femtime(fem, ...
----------------------------------------------------------------
Any ideas what might be occuring? After trying the failing script in matlab, i reopen it in the gui and it again works fine.
Please Help!
William M.
I am running a simulation which couples 2 odes and 2 pdes together in a simple 1 dimensional mode. The simulation requires the two stages are simulated sequentially. In the first stage the temperature is a constant variable. The second stage then uses the final conditions from the initial stage as the ICs and has the temperature T activated as an application mode where I specify the dT/dt=constant and elimate the constant value T.
The simulation ran fine until I began implementing my own matlab functions as scalar expressions. When I add them and run the simulation in the gui, there are no problems. When I save the simulation as a mfile script and try running it in the matlab workspace i get errors in between the saving the conditions of the first stage and running the second stage. The error is as follows:
-------------------------------------------------------------
??? Java exception occurred:
Exception:
com.femlab.server.MlError: Error using ==> rdivide
Matrix dimensions must agree.
(rethrown as com.femlab.jni.FlNativeException)
Messages:
Error using ==> rdivide
Matrix dimensions must agree.
Error in callback
Stack trace:
at callback.cpp, row 113, ()
at com.femlab.solver.FlSolver.femTime(Native Method)
at com.femlab.solver.FemTime.run(SourceFile:69)
at com.femlab.server.FlRunner.run(SourceFile:120)
at com.femlab.server.MlProgressDlg.runAndWait(SourceFile:142)
at com.femlab.server.FlRunnable.runAndWait(SourceFile:69)
Error in ==> femsolver at 225
solobj.runAndWait(report, 'Solution Progress', loopTime);
Error in ==> femtime at 61
varargout = femsolver(mfilename,'FemTime',varargin{:});
Error in ==> testfunctioninput2 at 389
fem.sol=femtime(fem, ...
----------------------------------------------------------------
Any ideas what might be occuring? After trying the failing script in matlab, i reopen it in the gui and it again works fine.
Please Help!
William M.
1 Reply Last Post 24.10.2009, 13:04 GMT-4