Unable to save all the data in workspace, app designer
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Reshma Nerella
am 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.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Import and Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!