MATLAB: Linewidth for specific line

linewidthMATLAB

how to specify linewidth for one line in a multi line plot?

Best Answer

Noam
I kindly ask to have the following answer marked as Accepted Answer:
x = 1:1:10;
L=5 % amount of lines
y = randi([1 10], L,10);
Lwidth=[1 2 3 4 5]
figure(1);hold all
for k=1:1:L
plot(x,y(k,:),'LineWidth',Lwidth(k))
end
grid on
or
figure(1);hold all
for k=1:1:L
h=plot(x,y(k,:))
h.LineWidth=Lwidth(k)
end
grid on
.
appreciating time and attention
John BG