채택된 답변:Star Strider MATLAB Online에서 열기 The springs exert a force that is proportional to their compression and the proportionality constant is the spring constant k. The two side springs p
MATLAB Online에서 열기 1) Y=linspace(dy,dy*yNum*1000000,yNum); 2) X=linspace(dx,dx*xNum*1000000,xNum); 3) X=rot90(X,3); 댓글 수: 0 댓글을 달려면 로그인하십시오. 답변 (1개)
y = linspace(-0.1,0.3,5) y = -0.1000 0 0.1000 0.2000 0.3000 x == y ans = 1 1 0 0 1 So, what happens when you do A = 5.8:0.1:6? How are the numbers created? And how can the following be explained? ThemeCopy A = 5.8:0.1:6; B = 5.8:0.1:6.1; A(2)-B(2) ans = 8....
Open in MATLAB Online w1=104; s=0.3; u=1; >> w2=w1*(1-(s^2))^(1/2) w2 = 99.2097 >> y=(s)/(1-(s^2)) y = 0.3297 >> t=linspace(0,0.2,100); >> x=u*(1-exp(-s*w1*t)*(cos(w2*t)-y*sin(w2*t)));
Star Strider has a point too. However with the values you have, linspace does not actually pass very close to -2 or 2. (Try linspace(-10, -0.05)). At least on my system there are no out of bounds values involved. However if I use:
I appreciate your help. I removed the . after sqrt, and I apologise for the insufficient info, I'm still new to this. The main body above is a function of v (labelled mainFunc) and I'm calling fzero in another script, using:
Fv = linspace(0, 1, fix(length(fft)/2)+1)*Fn; % One-Sided 'fft' Iv = 1:numel(Fv); % Index Vector The fft result to be plotted would then use ‘Fv’ and ‘Iv’ to create an equal-length fft vector. Use the fftshift function to create a two-sided fft result, then: Fv...
Hi, I need to draw the Second Order Response function for Zeta = 0.5, 1 ,2 and tau Tau = 0.5: The functions are defined as: Here is what I did: loadxival.txt; tau=0.5; v=xival; n=length(v); t=linspace(-10,10); fori=1:n ...
>> t=linspace(0,2*pi,100); >> y=5*t.*(sin(t).^2)-t.^2*(cos(t).^2); Error using * Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use...
When you called "ode45", you were only passing in a scalar value for the initial condition. However, it looks like your "odefun" expects a 3x1 solution vector at each time step and returns a 3x1 "dydt" vector. I don't know the details of the ODEs...