I am using MATLAB livelink for a heat transfer problem. I am trying to define a function for density of the material used in my model. I use the following commands in MATLAB to make the function. I should also mention that Density.m file is also in the directory in which the main MATLAB file is.
extm1=model.func.create('extm1', 'MATLAB');
Density=extm1.setIndex('funcs', 'Density', 0, 0);
extm1.setIndex('funcs', 'T', 0, 1);
mat1.propertyGroup('def').set('density', {'Density(T)[kg/m^3]'});
As soon as I execute (std1.run) a “MATLAB command window” shows up and the code execution breaks due to the following error.
Matlab function is not found: Density
- Function: Density
- Feature: Time-Dependent Solver 1 (sol1/t1)
- Error: Matlab function is not found: Density
I greatly appreciate it if you help me with this problem.
extm1=model.func.create('extm1', 'MATLAB');
Density=extm1.setIndex('funcs', 'Density', 0, 0);
extm1.setIndex('funcs', 'T', 0, 1);
mat1.propertyGroup('def').set('density', {'Density(T)[kg/m^3]'});
As soon as I execute (std1.run) a “MATLAB command window” shows up and the code execution breaks due to the following error.
Matlab function is not found: Density
- Function: Density
- Feature: Time-Dependent Solver 1 (sol1/t1)
- Error: Matlab function is not found: Density
I greatly appreciate it if you help me with this problem.