回答済み
I need to find the displacement and velocity characteristics of a suspended mass on a boat. I am struggling to develop a state space expression that can take a sinusoidal input, and then to plot graphs of displacement and velocity from this.
You need to define your outputs(with C matrix) correctly. Since you would like to see both displacement and velocity, then C mat...

約2ヶ月 前 | 0

| 採用済み

回答済み
How to plot a smooth graph?
You need to increase the step size of your t vector: t = linspace(0,10,100); Code: b0 = 0.015; b1 = 0.015; b2 = 0.035; b3 ...

約2ヶ月 前 | 1

| 採用済み

回答済み
How to indicate that there are no zeros for a transfer function for the command zpk?
zpk([],[0 0 0],1) You basically leave zero input section empty as above.

約2ヶ月 前 | 0

| 採用済み

回答済み
pid tunnig with non unity feedback
Try the following approach: s=tf('s'); %needed to define transfer function in s domain G=1/3*s+4;H=1/(0.1*s+1); %if feedback i...

約2ヶ月 前 | 0

| 採用済み

回答済み
Symbolic solution to a system of algebraic equations
syms a b x N g b L m eqns = [(1/b)*(-2*N*sin(a))/3==m*L, x/b==-(5*L*cos(a))/6+(5*a^2*L*sin(a))/6, N/b==m*(5*L*sin(a))/6+(5*a^2*...

約2ヶ月 前 | 0

| 採用済み

回答済み
Simple Matrix Reduction Question. Ones and Zeros.
[rows,cols]=find(A==1); [C,I]=sort(rows); B=cols(I)

約2ヶ月 前 | 0

| 採用済み

回答済み
Integrating using sums(riemann sums)
You may use rsums. It allows you to interactively calculate the riemann sum integral: rsums(f,5,17.688) Riemann Sum Integral

約2ヶ月 前 | 0

| 採用済み

回答済み
how to solve equation with a function solution matlab
Try this: syms s H2new G1=1/(s-1); G2=s^2-s; H1=s^2-1; H2=-1/s; G=(G1*G2)/(1+G1*H1+G1*G2*H2); H1new=s^2+9*s-10; Gnew=(G1...

約2ヶ月 前 | 1

回答済み
Taking data from matrix and using it in a function
As far as I understand, you want to change E1, E2, E3 and E4 respectively with combinations of -1 and 1. So the following code d...

約2ヶ月 前 | 0

回答済み
plot the exp function
syms y(t) eq=diff(y,2)+13*diff(y)+40*y==4; Dy=diff(y); Y(t)=dsolve(eq,[y(0)==0 Dy(0)==0]) t=0:0.001:0.9; plot(t,Y(t))

約2ヶ月 前 | 0

| 採用済み

回答済み
What is better for differential equations - MATLAB or Simulink?
Simulink works numerically, you can not solve differential equations symbolically in Simulink. If you want to obtain symbolic so...

約2ヶ月 前 | 0

回答済み
I want to add a 45-degree line on my plot. I tried some ways (including refline) all give me a 38-degree line!
Try the following: figure(1);hold on; MONTHLY=scatter(X,Y); plot(0:600); %45 degree line plot(0:600,0.73*(0:600)+6.47); %tre...

約2ヶ月 前 | 1

| 採用済み

回答済み
What is this Simulink Block called in the library browser?
That block seems to be a discretized sine wave. You can find it in Sources library. Also, you can discretize the Sine wave block...

約2ヶ月 前 | 0

回答済み
how do i check if a number is a prime number, a square, and or a factor of 6?
n=4; %check if number is prime isprime(n) %returns logical value %check if number is square mod(numel(factor(n)),2)==0 %retu...

約2ヶ月 前 | 1

| 採用済み

回答済み
How to solve 2nd order differential equations while variables are coupled?
Try the following code: syms w U1r(x) U1i(x) U2i(x) U2r(x) L m d eq1=(w-1)*U1r-diff(U1i)+L*U2r-m*diff(U1r,2)==0; eq2=(w+1)*U...

約2ヶ月 前 | 0

| 採用済み

回答済み
Matlab equivalent of in from python
exist command will do. Check its usage: https://www.mathworks.com/help/matlab/ref/exist.html

約2ヶ月 前 | 0

| 採用済み

回答済み
Flipped numbers (number pyramid)
n=4; for i=1:n A(i)=str2double(string(sprintf('%d',1:i))); end disp(A)

約2ヶ月 前 | 0

回答済み
anyone can solve code y” + y’ =0 to find general solution
syms y(t) eq=diff(y,2)+diff(y)==0; y(t)=dsolve(eq)

約2ヶ月 前 | 0

回答済み
asymptotic magnitude bode plot of fractional order transfer function
The following code should give you what you want: hold off; alpha=0.9;Wcr=2; w1=logspace(-1,log10(Wcr),1000);w2=logspace(log1...

約2ヶ月 前 | 0

回答済み
Filtering Columns by Contents of Rows
n=2; A(:,(sum(~isnan(A),2)<n).')=[]

約2ヶ月 前 | 0

回答済み
the function of \n
newline For instance: chr = 'Whose woods these are I think I know.'; chr = [chr newline 'His house is in the village though']...

約2ヶ月 前 | 1

| 採用済み

回答済み
convert simulink file from 2017a to 2016a
Find it attached.

約2ヶ月 前 | 0

回答済み
How do I give order or number for "a" with ijk in the following code ? Please help me
What you are trying to do is not recommended in MATLAB since dynamically creating variables is not useful. You have several othe...

約2ヶ月 前 | 0

| 採用済み

回答済み
If i try to write derivative of f in the below code(i pointed here), it doesn't work. why?
You do not have to use Symbolic approach this time. Try the following code: hold off; x1=2.5; f=@(x) x.*sqrt(x)+2*x.^3+1.5; %...

約2ヶ月 前 | 0

回答済み
Vectorize for loop with recursion
P1(P4>0)=x; P2(P4<0)=x; P3=P1+P2; P4(2:end)=P3+P4(1:end-1);

2ヶ月 前 | 0

回答済み
How to create a clickable timeline using app designer, with play/pause button?
If I understood it correctly, you want to dynamically change the time limits of an axes property. The attached app may be a star...

2ヶ月 前 | 0

回答済み
How to replace equations in symbolic function
By using subs function: syms a b x F=3*a*b; Fnew=subs(F,{a,b},{x,1})

2ヶ月 前 | 0

| 採用済み

回答済み
problem with function sinc
Adapt its formula as follows: x = 0:pi/100:2*pi; y=sin(pi*x)./(pi*x);%sinc function plot(y)

2ヶ月 前 | 1

| 採用済み

回答済み
repeat an element in a vector
[n(1) n] or [repmat(n(1),1) n]

2ヶ月 前 | 0

| 採用済み

Load more