How can I express all the variables Vcm1, Vcm2, Vcm3, Vcm4 in num2str without getting an error?
    4 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
annotation('textbox',dim,'String',((num2str(Vcm1),num2str(Vcm2),num2str(Vcm3),num2str(Vcm4)), 'FontSize';15)
2 commentaires
  Stephen23
      
      
 le 4 Juil 2024
				What are Vcm1, etc? What types and values do they have? What is the expected output from num2str ?
Réponse acceptée
  Aquatris
      
 le 4 Juil 2024
        Dont know what exactly you are trying to do but here is an example using your variable names:
dim = [0.2 .5 0.25 0.1];% normalized dimensions
Vcm1 = 1.05;
Vcm2 = 2.05;
Vcm3 = 6.52;
Vcm4 = -2.56;
myText = sprintf('%.2f, %.2f, %.2f, %.2f',Vcm1,Vcm2,Vcm3,Vcm4);
figure(1)
plot([0 10],[0 10])
annotation('textbox',dim,'String',myText, 'FontSize',8)
0 commentaires
Plus de réponses (1)
Voir également
Catégories
				En savoir plus sur Animation dans Help Center et File Exchange
			
	Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



