Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

Need help fixing graph

1 view (last 30 days)
Michael Fugate
Michael Fugate on 12 Jun 2019
Closed: MATLAB Answer Bot on 20 Aug 2021
good afternoon,
im trying to ajust this script which was answered from a previous person
%Assign values of lamda from 0.01 to 2, in increments of 0.001
lambda = 0.01:0.001:2;
%assign XsubscriptSF value
XsubscriptSF = 2;
%calculate number of lamda values to be used
n = length(lambda);
%preallocate memory to store X values
X = zeros(1,n);
%Calculate X values
for i = 1:n
X(i) = XsubscriptSF/(1-lambda(i)^2);
end
plot(lambda,X)
title('Lambda VS Static Deflection for X_{SF}')
xlabel('Lambda (units)')
ylabel('X_{SF} (units)')
However, I'm trying to make it look like the graph that I attach in the following picture. If anyone can point out what to do/adjust, it would be greatly appreciated.
IMG_7303.png
  3 Comments
James Browne
James Browne on 12 Jun 2019
Are you sure you are using the right equation to calculate X? It would also be helpful to know what type of problem this. It looks like a solution to a differential equation, maybe?
It looks to me like you are looking for a time dependant response but the eqiuation for X is not time dependant. If you are looking to generate a plot with 3 families of equations, based on various lambds values, that is not a difficult change to make, if you have the right equation for the time dependant response of the system~
Michael Fugate
Michael Fugate on 12 Jun 2019
Yes i am trying to solve for X, im just trying to graph the complete solution above the problem is a vibrations problem, static force deflection and to be more specific: Deflection of a spring under static force. The equation is derived from:
X= (Psub zero/K)/(1-(w/wsubscript n)^2)
and lambda is equal to w/wsubscript n

Answers (0)

This question is closed.

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!