Display string and variable value in a window in a GUI or different output
Afficher commentaires plus anciens
Hey everyone, I'm very rusty on my C and matlab skills but basically what i'm trying to do is find a way to display certain variable values in my code to display in a way that when the code is ran i can get my charts, graphs and displayed values all in different figure windows ect. I'm doing a statistics for engineers class and i've wasted more than enough time trying to figure out how to make what i want work so I was hoping someone could provide some guidance on what to do next.
The Problem: In the work space i have a median value labled Median_X and it has a value of 14.545 and the rest of the variables are the same.
Code i've attempted:
msg = '';
msg = sprintf('A=%d\n, Median_X);
msgbox(msg,'Output Params');
===> the display is in the box but it shows up as 14.545000000e.... i don't want that and i can't find a way to force it to just take 3 or 4 sig figs,
What i would like is to display something like in a message box but reads the following:
Parameters of the discrete random variable [X]
Standard Deviation=...
Mean=...
Median=...
Max value X=...
Min value X=...
Any help would be greatly appreciated!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!