MATLAB Programming Question
How do I write a script to plot the diameter as a function of the length? I have the data imported and loaded, but not exactly sure how to write this portion.
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
Please note since I am not having the data so I have taken the random ones. You may change it in the script.
clc
clear all
close all
format long;
length=1:10;
diameter=randi([2,6],1,10);
plot(length,diameter);
xlabel('Length');
ylabel('Diameter');
title('Plot of Diameter as function of length');
Kindly revert for any queries
Thanks.
Get Answers For Free
Most questions answered within 1 hours.