How to display the contents of a cell in a messagebox
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mats de Jong
am 10 Okt. 2019
Kommentiert: Adam Danz
am 11 Okt. 2019
I have a 6x1 cell variable with name 'Compounds' containing the six names of identified substances is an analyzed sample. My Question now is how I can let these names pop up in a messagebox. I know I can use the msgbox function, but I can't get it to work with the cell variable. Anyone who can help me out?
1 Kommentar
Akzeptierte Antwort
Adam Danz
am 11 Okt. 2019
Bearbeitet: Adam Danz
am 11 Okt. 2019
compounds = {'CaCO3','CO2','CuSO4','C6H12O6','HCI','NaCl'};
msg = msgbox(['Compounds: ', strjoin(compounds,', ')],'title')
If you want subscripts,
compounds = {'CaCO_3','CO_2','CuSO_4','C_6H_1_2O_6','HCI','NaCl'};
createMode.WindowStyle = 'non-modal';
createMode.Interpreter = 'tex';
msg = msgbox(['Compounds: ', strjoin(compounds,', ')],'title',createMode)
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Environment and Settings 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!