Horje
add variable to legend matlab Code Example
add manual legend matlab
h1=plot([1:10],'Color','r','DisplayName','This one');hold on;
h2=plot([1:2:10],'Color','b','DisplayName','This two');
h3=plot([1:3:10],'Color','k','DisplayName','This three');
legend([h1 h3],{'Legend 1','Legend 3'})
add variable to legend matlab
str = {strcat('z = ' , num2str(z))}  % at the end of first loop, z being loop output
str = [str , strcat('z = ' , num2str(z))] % after 2nd loop
% plot your data
legend(str{:})




Cpp

Related
c++ output Code Example c++ output Code Example
sort c++ Code Example sort c++ Code Example
how to grab numbers from string in cpp Code Example how to grab numbers from string in cpp Code Example
for statement in c++ Code Example for statement in c++ Code Example
cpp convert vector to set Code Example cpp convert vector to set Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8