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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started