Info

此问题已关闭。 请重新打开它进行编辑或回答。

Need help fixing graph

1 次查看(过去 30 天)
Michael Fugate
Michael Fugate 2019-6-12
关闭: MATLAB Answer Bot 2021-8-20
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 个评论
James Browne
James Browne 2019-6-12
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 2019-6-12
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

回答(0 个)

此问题已关闭。

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by