Unable to save all the data in workspace, app designer

1 回表示 (過去 30 日間)
Juan Pablo Guamn Bernal
Juan Pablo Guamn Bernal 2021 年 7 月 27 日
コメント済み: Reshma Nerella 2022 年 2 月 2 日
Greetings
I made the following code, using app designer, and the first part works just fine, I can save the data when the selection is ABS or PE+PP in the workspace, but related with the coolant information (Cooling_fluid), something is wrong, and so far I do not know what it is, thanks for any help
if true
Min_radius = app.MinradiusmmEditField.Value;
Max_radius = app.MaxradiusmmEditField.Value;
Material_selection = app.PartmaterialDropDown.Value;
switch Material_selection
case 'ABS'
Material_selection = cellstr('ABS');
assignin('base','Specific_heat_part',2.4);
assignin('base','Conductivity_part',0.18);
case 'PE+PP'
Material_selection = cellstr('PE + PP');
assignin('base','Specific_heat_part',2.2);
assignin('base','Conductivity_part',0.16);
end
Cooling_fluid = app.CoolingChannelDropDown.Value;
switch Cooling_fluid
case 'Yes'
Cooling_fluid = cellstr('Water');
assignin('base','Specific_heat_coolant',4.18);
assignin('base','Conductivity_coolant',5.98);
case 'No'
Cooling_fluid = cellstr('None');
assignin('base','Specific_heat_coolant',0);
assignin('base','Conductivity_coolant',0);
end
save('pathtomat.mat','Min_radius','Max_radius','Material_selection','Cooling_fluid');
end
Table_info = [Min_radius Max_radius Cooling_fluid Material_selection];
app.DATA_INPUT.Data = Table_info;
assignin('base','Min_radius',Min_radius);
assignin('base','Max_radius',Max_radius);
  1 件のコメント
Reshma Nerella
Reshma Nerella 2022 年 2 月 2 日
Hi,
The code seems fine, can you please give more information about the issue you are facing with coolant information to help you better.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import and Analysis についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by