Someone who is interested in Mathematics, Control and Engineering. Also, music as a hobby.

Answered

Plotting a discrete impulse in Simulink

Try the attached model. See if it works for you. You can modify it.

Plotting a discrete impulse in Simulink

Try the attached model. See if it works for you. You can modify it.

29 days ago | 0

| accepted

Answered

how to change a variable value in the middle of simulation in simulink

Try the attached model. Copy the structure and replace it with the pulse generation block. It should work. Instead of writing p ...

how to change a variable value in the middle of simulation in simulink

Try the attached model. Copy the structure and replace it with the pulse generation block. It should work. Instead of writing p ...

29 days ago | 0

Answered

How can I save and plot all values of x and y for each value of C? x and y values are in the vertical axis and C in the horizontal axis in the graphic. I need to use the function "solve"

Try the following code: clear;clc; V=[1 2 3 4]; A=3; for i=1:numel(V) C(i)=A*V(i); syms x y eqn1=C(i)*x+y==2;...

How can I save and plot all values of x and y for each value of C? x and y values are in the vertical axis and C in the horizontal axis in the graphic. I need to use the function "solve"

Try the following code: clear;clc; V=[1 2 3 4]; A=3; for i=1:numel(V) C(i)=A*V(i); syms x y eqn1=C(i)*x+y==2;...

1 month ago | 0

| accepted

Answered

finding an equation of the tangent line to a curve at the given point in MATLAB

Actually, it is quite simple to do. For instance, let's define the equation symbolically in MATLAB: syms y(x) y(x)=4*x-3*x^2; ...

finding an equation of the tangent line to a curve at the given point in MATLAB

Actually, it is quite simple to do. For instance, let's define the equation symbolically in MATLAB: syms y(x) y(x)=4*x-3*x^2; ...

1 month ago | 0

Answered

Solving differential equations with Simulink

If you consider the ramp imput as a function r(t)=t; then the equation becomes If you code this in MATLAB: syms x(t) eq=...

Solving differential equations with Simulink

If you consider the ramp imput as a function r(t)=t; then the equation becomes If you code this in MATLAB: syms x(t) eq=...

1 month ago | 0

| accepted

Answered

External Mode Error in Simulink - Using TI Piccolo F2803x

The main thing about External Mode is that you need to make sure that the code is running on the hardware before you try to run ...

External Mode Error in Simulink - Using TI Piccolo F2803x

The main thing about External Mode is that you need to make sure that the code is running on the hardware before you try to run ...

1 month ago | 0

Answered

Simulink stateflow condition for single pulse input

Try the attached model. Note how the inside of Stateflow is built.

Simulink stateflow condition for single pulse input

Try the attached model. Note how the inside of Stateflow is built.

1 month ago | 0

| accepted

Answered

Square approximation with a second degree polynomial, function determine.

Simply, you need to use Curve Fitting app for this purpose. Define your Xi and f(Xi) vectors in MATLAB workspace. Then open Curv...

Square approximation with a second degree polynomial, function determine.

Simply, you need to use Curve Fitting app for this purpose. Define your Xi and f(Xi) vectors in MATLAB workspace. Then open Curv...

1 month ago | 1

| accepted

Answered

How to have a implicit function of a symbolic variable in our expressions and calculations

Simply, you can define symbolic functions just like symbolic variables: syms x y z f(x) A=(3*x+5*y+3*z+5)*(f(x)+z); diff(A,x)...

How to have a implicit function of a symbolic variable in our expressions and calculations

Simply, you can define symbolic functions just like symbolic variables: syms x y z f(x) A=(3*x+5*y+3*z+5)*(f(x)+z); diff(A,x)...

1 month ago | 0

| accepted

Answered

How to Find Kp,Ki for PI controller from Gain and Time Constant value Given

Simply, the conversion is as follows(Let K denote gain and Ti denote time constant): K*(1+1/(Ti*s)) is equal to Kp+Ki/s If y...

How to Find Kp,Ki for PI controller from Gain and Time Constant value Given

Simply, the conversion is as follows(Let K denote gain and Ti denote time constant): K*(1+1/(Ti*s)) is equal to Kp+Ki/s If y...

1 month ago | 0

| accepted

Answered

computing a sequence of vectors

Try the following code: n=1;L=1;d=1;q=1;%randomly given syms alpha C=0.5*q*sin(alpha)*[L+d]; D=0.5*q*sin(alpha)*[L^2/d]; ...

computing a sequence of vectors

Try the following code: n=1;L=1;d=1;q=1;%randomly given syms alpha C=0.5*q*sin(alpha)*[L+d]; D=0.5*q*sin(alpha)*[L^2/d]; ...

1 month ago | 0

| accepted

Answered

How to analyze signal and make proper filter?

If you want to have a starting point, following code basically takes the psd of the signal, so that you will be able to obtain t...

How to analyze signal and make proper filter?

If you want to have a starting point, following code basically takes the psd of the signal, so that you will be able to obtain t...

1 month ago | 0

Answered

How to put max function in symbolic function

Why would you try to name it as max? Simply, piecewise function in Symbolic toolbox would help you: syms x f(x)=piecewise(x<0,...

How to put max function in symbolic function

Why would you try to name it as max? Simply, piecewise function in Symbolic toolbox would help you: syms x f(x)=piecewise(x<0,...

1 month ago | 1

Question

Receive Raw Ethernet Packet via Simulink

Hello, My question is simple: I would like to use Simulink, just like Wireshark, to capture and display raw ethernet packets. I...

8 months ago | 1 answer | 0

Answered

Derivate a function with two variable dependent of time

The following might help: syms r(t) theta(t) f(r,theta) f=r^2+0.2*cos(theta)-0.03 To take partial derivative, use functionalD...

Derivate a function with two variable dependent of time

The following might help: syms r(t) theta(t) f(r,theta) f=r^2+0.2*cos(theta)-0.03 To take partial derivative, use functionalD...

10 months ago | 0

Answered

define tau in transfer function

The following might help: syms s t tau Cs=(1/s)*(1/(tau*s+1)); c(t,tau)=ilaplace(Cs) T=0:0.01:1; plot(T,c(T,0.1))

define tau in transfer function

The following might help: syms s t tau Cs=(1/s)*(1/(tau*s+1)); c(t,tau)=ilaplace(Cs) T=0:0.01:1; plot(T,c(T,0.1))

10 months ago | 0

Question

Capabilities of Building Standalone Simulation Applications in App Designer with Simulink Compiler

Hello everyone, For those who do not know, MATLAB released Simulink Compiler with 20a release which helps to build and deploy s...

10 months ago | 0 answers | 0

Answered

How is derivative made in Matlab ?

syms v(t) v(t)=t.^3-6t.^2+7; a(t)=diff(v); result=a(3.5)

How is derivative made in Matlab ?

syms v(t) v(t)=t.^3-6t.^2+7; a(t)=diff(v); result=a(3.5)

10 months ago | 0

| accepted

Answered

Replacing characters in a string

One example(use regexprep): s="Yao Ming"; regexprep(s,{'Y','M'},{'J','Q'})

Replacing characters in a string

One example(use regexprep): s="Yao Ming"; regexprep(s,{'Y','M'},{'J','Q'})

11 months ago | 0

Answered

How to update a variable in a function after every 5 seconds?

Run the attached model and see the results. You can change the Ramp block's Slope value and store different numbers. Output of t...

How to update a variable in a function after every 5 seconds?

Run the attached model and see the results. You can change the Ramp block's Slope value and store different numbers. Output of t...

11 months ago | 0

Answered

Function like "find" but for lines

B=reshape(A.',1,[]); C=(1:numel(A)).*(B~=0); C=C(C~=0)

Function like "find" but for lines

B=reshape(A.',1,[]); C=(1:numel(A)).*(B~=0); C=C(C~=0)

11 months ago | 0

Answered

Matrix with numeric values

N=4 A=1:N; B=char(64+A) 'ABCD' B(1) 'A' B(2) 'B' . . and so on. Change N and observe the results.

Matrix with numeric values

N=4 A=1:N; B=char(64+A) 'ABCD' B(1) 'A' B(2) 'B' . . and so on. Change N and observe the results.

11 months ago | 0

| accepted

Answered

Solving non linear 2nd order differential equation

Try this: clear syms t Y0= input('wave amplitude ') ; %Wave ampli...

Solving non linear 2nd order differential equation

Try this: clear syms t Y0= input('wave amplitude ') ; %Wave ampli...

11 months ago | 0

| accepted

Answered

y[n] = x[n] - x[n-1] x[n-2] I need to find a) Find the transfer function. b) Give the impulse response. d) Sketch the frequency respo

Try this: z=tf('z',0.001); Gz=1-z^-1+z^-2; %%transfer function Gs=d2c(Gz,'tustin') %%impulse response figure(1); impulse(...

y[n] = x[n] - x[n-1] x[n-2] I need to find a) Find the transfer function. b) Give the impulse response. d) Sketch the frequency respo

Try this: z=tf('z',0.001); Gz=1-z^-1+z^-2; %%transfer function Gs=d2c(Gz,'tustin') %%impulse response figure(1); impulse(...

11 months ago | 0

Answered

How can I remove identical cell entries containing small arrays

The following code should simply do the job for you: unique(cell2mat(connect_group),'rows') After this, you can regroup the ar...

How can I remove identical cell entries containing small arrays

The following code should simply do the job for you: unique(cell2mat(connect_group),'rows') After this, you can regroup the ar...

11 months ago | 0

Answered

Simulink-Sawtooth Decrease Counter

Try the attached model. Note that I didn't use Pulse Generator or Detect Decrease or Sum or Memory block. The model is very simp...

Simulink-Sawtooth Decrease Counter

Try the attached model. Note that I didn't use Pulse Generator or Detect Decrease or Sum or Memory block. The model is very simp...

11 months ago | 0

Answered

how can I do this in mat lab

syms u(t) x(t) h(t) u(t)=piecewise(t>=0,1,0); x(t)=cos(pi*t)*(u(t)-u(t-1)); h(t)=1.5*(u(t)-u(t-1.5)); %%plot t=0:0.001:5; ...

how can I do this in mat lab

syms u(t) x(t) h(t) u(t)=piecewise(t>=0,1,0); x(t)=cos(pi*t)*(u(t)-u(t-1)); h(t)=1.5*(u(t)-u(t-1.5)); %%plot t=0:0.001:5; ...

11 months ago | 0

| accepted

Answered

Plotting the derivative of an "switch-funktion"

You may use Symbolic Toolbox and its beauties for this case :) Here is the code: syms y1(t) y2(t) y3(t) y4(t) y1(t)=piecewise(...

Plotting the derivative of an "switch-funktion"

You may use Symbolic Toolbox and its beauties for this case :) Here is the code: syms y1(t) y2(t) y3(t) y4(t) y1(t)=piecewise(...

11 months ago | 0

| accepted

Answered

How can i fix the error 'Index exceeds the number of array elements (51)'

You need to apply elementwise division: x = [0:0.1:5]; y = sin(x)./x; plot(x, y), xlabel('xi'), ylabel('Theta'), title('Solut...

How can i fix the error 'Index exceeds the number of array elements (51)'

You need to apply elementwise division: x = [0:0.1:5]; y = sin(x)./x; plot(x, y), xlabel('xi'), ylabel('Theta'), title('Solut...

11 months ago | 1

| accepted