Discussion ClosedThis 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.

Creating Table using MATLAB command

Please login with a confirmed email address before reporting spam

I want to create a table in COMSOL using MATLAB simulink. I have designed the model with various excitation in each iteration and created the model, however, i am unable to create table from this model for simple voltage, current and resistance calculation.

It is giving an error as **An object with the given name already exists.

- Tag: eval1**

even though I have created an array of eval_param.

please help me to solve this issue:

for i = 1:9 eval_param = sprintf('eval%d', i); tbl{i} = sprintf('tbl%d', i); vol_name = sprintf('mf.VCoil_coil_%d', i); cur_name = sprintf('mf.ICoil_coil_%d', i); res_name = sprintf('mf.RCoil_coil_%d', i);

V_name = sprintf('Coil %d voltage', i); I_name = sprintf('Coil %d current', i); R_name = sprintf('Coil %d resistance', i); % Create numerical evaluation

model.result.numerical.create(eval_param, 'EvalGlobal');

model.result.numerical(eval_param).label(eval_param); model.result.numerical(eval_param).set('probetag', 'none'); model.result.numerical(eval_param).set('expr', {vol_name, cur_name, res_name}); model.result.numerical(eval_param).set('descr', {V_name, I_name, R_name}); % Create table model.result.table.create(tbl{i}, 'Table'); model.result.table(tbl{i}).comments(['Global Evaluation', num2str(i)]); model.result.numerical(eval_param).set('table', tbl{i}); model.result.numerical(eval_param).setResult;

end


0 Replies Last Post 2024年2月28日 GMT+1 22:43
COMSOL Moderator

Hello Poonam Chand

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL®software users who are on-subscription should submit their questions via theSupport Centerfor a more comprehensive response from the Technical Support team.

Baidu
map