URDME / urdme

Stochastic reaction-diffusion simulation on unstructured meshes.
www.urdme.org
GNU General Public License v3.0
28 stars 12 forks source link

First argument to exist must be a string (comsol2urdme) #17

Closed ahellander closed 11 years ago

ahellander commented 11 years ago

Getting the following error in comsol2urdme:

Error using exist The first input to exist must be a string.

Error in urdme2comsol (line 74) if ~exist(tspan)

Error in urdme_addsol (line 52) umod = urdme2comsol(umod,umod.U,umod.tspan,verbose);

Error in urdme (line 310) umod = urdme_addsol(umod,opts.outfile);

ahellander commented 11 years ago

I removed this code:

%if ~exist(tspan) %tspan = umod.tspan; %end

Since we already make sure that we have a tspan in scope, either as part of umod.tspan or passed as an argument, it seems redundant. If this is wrong, this would fix the problem:

if ~exist('tspan') tspan = umod.tspan; end