Question: [Quick MatLab plotting question!] Below is my code for MatLab, which I am using to plot 4 different Delta points: Delta bar, Delta star, Delta

[Quick MatLab plotting question!]

Below is my code for MatLab, which I am using to plot 4 different Delta points: Delta bar, Delta star, Delta average, and true Delta. I can get all of the lines to plot perfectly fine (yes I know they are choppy and adding more data points/intervals would make it a smoother line, but this is what was asked) except for true Delta, which won't show up most likely because it is only plotting the specific points. How can I get these points to plot with a line in between them like the rest of my data? Thanks in advance for your help! I tried a bunch of different solutions that I found online, but none seem to work.

r_1=150; r_2=100; L=500; E=70; N=[2 5 10 20 50 100]; P=10000;

%Real Delta Delta=((P.*L)./(pi.*E.*(r_1-r_2))).*((1./r_2)-(1./r_1)); Delta

%Delta Star (overestimate) r_n=(50./N); r_2_star=r_1-((r_n).*(N-1)); Delta_star=((P.*L)./(pi.*E.*(r_1-r_2_star))).*((1./r_2_star)-(1./r_1)); Delta_star

%Delta Bar (underestimate) r_1_bar=r_2+((r_n).*(N-1)); Delta_bar=((P.*L)./(pi.*E.*(r_1_bar-r_2))).*((1./r_2)-(1./r_1_bar)); Delta_bar

%Delta Average Delta_avg=(Delta_bar+Delta_star)/2; Delta_avg

plot(N,Delta_bar);

hold on

plot(N,Delta_star);

hold on

plot(N,Delta_avg)

hold on

%THIS IS WHERE IT IS JUST PLOTTING THE POINTS AND NOT A LINE LIKE THE REST

plot(N,Delta);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!