plot(x1,y1,x2,y2,'LineWidth',8)
but the linewidth propery ends up applying to both lines. Do I have to use two plot functions with a hold on command to have line1 a different width than line2?
Yes, you will need to use two separate plot functions with the hold on
command to set different line widths for each line in MATLAB. Here's an example of how you can do this:
plot(x1, y1, 'LineWidth', 2); % Set the line width for the first line
hold on; % Hold the current plot
plot(x2, y2, 'LineWidth', 8); % Set the line width for the second line
hold off; % Release the plot hold
This way, each plot command will apply the specified line width to the respective line. The hold on
command ensures that both lines are plotted on the same graph.
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.