Unable to save all the data in workspace, app designer
1 view (last 30 days)
Show older comments
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 Comment
Reshma Nerella
on 2 Feb 2022
Hi,
The code seems fine, can you please give more information about the issue you are facing with coolant information to help you better.
Answers (0)
See Also
Categories
Find more on Data Import and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!