Risposto
finding overlapping and non-overlapping values in matrix
Try the following code: A=[3 16 4 16;3 21 4 21;3 29 3 29;17 27 18 29;25 72 26 72;61 70 61 70;62 63 62 63]; Un=0; for i=1:size...

circa 4 anni fa | 0

| accettato

Risposto
Matlab function for cumulative power
Try the following code. By changing r and n values, you can see the corresponding results. r=9;n=4; A=zeros(n+1,n+1); for i=1...

circa 4 anni fa | 2

| accettato

Risposto
PID controller block in simulink
This PID is in ideal form. In PID block in Simulink, you can set the PID to be in ideal form and enter the parameters. See the a...

circa 4 anni fa | 0

Risposto
Ho do i convert this number to an integer?
Try vpasolve: w=1150;di=32.59;do=23.44; sol=vpasolve((w-(2.*90.*sind(b))).^2==(w-(90.*sind(b+di))-(90.*sind(b-do))).^2+((90.*c...

circa 4 anni fa | 1

| accettato

Risposto
please help me check the error
You forgot to put multiplication operator. Try this: function A=odd_rms(n) A=sqrt(mean((1:2:2*n-1).^2)); end

circa 4 anni fa | 0

| accettato

Risposto
How to plug in one value a time from a matrix into a function (WaitSecs)
It should look something like this: for k=1:numel(A) WaitSecs(A(k)) end . . .

circa 4 anni fa | 0

| accettato

Risposto
How can I resolve this?
Following code solves the problem. The command t(0)==0 does not make any sense since t is independent variable. Also, you used d...

circa 4 anni fa | 0

| accettato

Risposto
How to simulate simulink model in a given set of time-points only?
Yes, it is possible. Consider the attached Simulink model which contains a ramp block and its slope parameter is set as 5. Its s...

circa 4 anni fa | 0

Risposto
Is it possible to do Real-time simulation with the C2000 device and Matlab Simulink?
Yes, but you have to use the serial communication interface of the C2000 device. Also, you need to set the configuration paramet...

circa 4 anni fa | 0

Risposto
differential equation 2DOF
You may try Symbolic Toolbox to solve the problem. Run the attached script to see the result.

circa 4 anni fa | 0

| accettato

Domanda


TMS320F28379D: Code Generation Error while Using CLA Task Trigger block in Simulink
Hello, I am using Launchpad F28379D in Simulink. I have a problem while generating code for a CLA Task triggered subsystem whic...

oltre 4 anni fa | 1 risposta | 0

1

risposta

Risposto
Numerical Integration from -Inf to Inf
Try the symbolic approach and consider the problem as follows: syms x F(x)=x*(x+0.1)^2*exp(2*(x+0.1)^2*3^2)*exp(-x^2); After ...

oltre 4 anni fa | 0

Risposto
Helping solving two variables in an equation
Try the following: Kt=[12 -1; -1 3]; I=[1 0;0 1]; lambda1=2.8902; w1=1.7001; V1=sym('V1',[2 1]); eqn=((Kt-lambda1*I)*V1)==...

oltre 4 anni fa | 1

| accettato

Risposto
Error when compiling with CLA on TI C2000 MCU in Simulink. Can't find "cla_header.h"
How did you solve this problem?

oltre 4 anni fa | 1

Risposto
Looping a matrix to find determinant
Following way can be a starting point: A=randi([1 5],8267,4);%%random data for i=1:max(size(A))-3 DetVal(i)=det(A(i:i+3,1...

circa 5 anni fa | 0

Risposto
How to extract two equal maximum values at different index
index=find(A==max(A)) This should give you the indexes.

circa 5 anni fa | 0

| accettato

Domanda


Strange behavior of diff function with symbolic variables
Hello everyone, There is a strange behavior that I encountered while using diff function with symbolic variables, not functions...

circa 5 anni fa | 1 risposta | 0

1

risposta

Risposto
Assign different value of step response to a transfer function at different time intervals
You can do it with a Signal Builder. I attached the Simulink model. Take a look.

circa 5 anni fa | 0

Risposto
how to plot constant gain with bode
To plot Bode of constant, define it as a transfer function but in the following way: Gs=tf(R1/(R1+R2),1); bode(Gs);

circa 5 anni fa | 1

| accettato

Risposto
How to write time dependent exponential with simple Simulink blocks
Try this attached model.

circa 5 anni fa | 0

Risposto
"solve " function returns inaccurate solutions
Try this: syms x assume(x,'real'); solx=vpasolve(x-sqrt(x+1)-sqrt(x-1)==0,x) or syms x assume(x,'real'); solx=vpa(solve(x...

circa 5 anni fa | 0

Risposto
matching from multiple arrays
One way: Result=double(ref & (ref==a{1} | ref==a{2} | ref==a{3}))

circa 5 anni fa | 0

Risposto
Just wondering how to I plot these functions into Matlab?
Try this: syms x(t) h(t) x(t)=piecewise(t>=-1 & t<=1,1,t<-1 | t>1,0) h(t)=rectangularPulse((t-1)/4) t=-5:0.01:5; ...

oltre 5 anni fa | 0

Risposto
How to construct a vector from specific elements in a matrix
B=[A(1,2);A(2,3);A(3,1)]

oltre 5 anni fa | 1

| accettato

Risposto
differentiation for a function
syms y(x) diff(diff(y,x)==x-y^2)

oltre 5 anni fa | 0

Risposto
How to delay a boolean signal by an amount of time?
Simply, use a *Delay* block. See the attached pictures for details.

oltre 5 anni fa | 0

| accettato

Risposto
I can I do logical indexing on a column
Is it possible for a value to be smaller than -8 and greater than 8 at the same time? Check your logical operator. You need _OR_...

oltre 5 anni fa | 0

| accettato

Risposto
Simulink write to array index
Of course it can be done. Check the attached files.

oltre 5 anni fa | 1

Risposto
NEED HELP IN MATLAB GUI FOR FOLLOWING CODE
Check the attached zip file. In screenshot, you will see how to enter x and y vectors and you will see that you obtain the resul...

oltre 5 anni fa | 0

| accettato

Risposto
Can I get the formula from the result value?
You may use *Curve Fitting Toolbox* for adapting formula(or function let's say) for your input and output values. There are seve...

oltre 5 anni fa | 0

| accettato

Carica altro