Unable to save all the data in workspace, app designer

1 vue (au cours des 30 derniers jours)
Juan Pablo Guamn Bernal
Juan Pablo Guamn Bernal le 27 Juil 2021
Commenté : Reshma Nerella le 2 Fév 2022
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 commentaire
Reshma Nerella
Reshma Nerella le 2 Fév 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Data Import and Analysis dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by