how to display the <1x19 cell> values in msgbox
    3 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    ajith
 il 29 Ago 2015
  
    
    
    
    
    Commentato: Walter Roberson
      
      
 il 5 Set 2015
            I need to display the <1x19 cell> values in msgbox using GUI.
0 Commenti
Risposta accettata
  Walter Roberson
      
      
 il 29 Ago 2015
        Every element of a cell array is allowed to be a different type, include structures, objects, multidimensional arrays, strings -- and other cell arrays. Some of those cannot be displayed as text, and some of them are a nuisance to display as text (e.g., 5 dimensional arrays of structures of multidimensional arrays of numeric values.) It is therefore not generally possible to display the contents of a cell array in a msgbox.
Displaying the contents might be practical if the form of the contents is known and fixed.
If the contents are strings you might wish to look at strjoin()
4 Commenti
  Walter Roberson
      
      
 il 5 Set 2015
				x =[149.3; 85.13323; 2; 42.5; sqrt(exp(1))];
msgstr = sprintf('Feature area=%g\nFeature volume=%g\nFeature Euclidean Number=%d\nFeature Perimeter=%g\nFeature Creeper=%g', x(1:5,1));
msgbox(msgstr);
Più risposte (1)
  Star Strider
      
      
 il 29 Ago 2015
        This works:
cellvct = {randi(99, 1, 19)};               % Create Cell
h = msgbox(sprintf('%g\n',cellvct{:}));     % Display Cell In ‘msgbox’
Vedere anche
Categorie
				Scopri di più su Cell Arrays in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!