how to set legend in matlab

 Accepted Answer

% Auto
A = rand(10,2) ;
plot(A)
legend
% Manually
plot(A)
legend('first','second')

More Answers (1)

Kishor
Kishor on 19 Dec 2022
Add a legend to plot using the array starname

Tags

Asked:

on 23 Sep 2021

Answered:

on 19 Dec 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!