Unable to save all the data in workspace, app designer
1 次查看(过去 30 天)
显示 更早的评论
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
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 Exchange 中查找有关 Data Import and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!