Answered
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...

ungefär 4 år ago | 0

| accepted

Answered
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...

ungefär 4 år ago | 2

| accepted

Answered
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...

ungefär 4 år ago | 0

Answered
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...

ungefär 4 år ago | 1

| accepted

Answered
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

ungefär 4 år ago | 0

| accepted

Answered
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 . . .

ungefär 4 år ago | 0

| accepted

Answered
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...

ungefär 4 år ago | 0

| accepted

Answered
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...

ungefär 4 år ago | 0

Answered
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...

ungefär 4 år ago | 0

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

ungefär 4 år ago | 0

| accepted

Question


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...

mer än 4 år ago | 1 answer | 0

1

answer

Answered
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 ...

mer än 4 år ago | 0

Answered
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)==...

mer än 4 år ago | 1

| accepted

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

mer än 4 år ago | 1

Answered
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...

ungefär 5 år ago | 0

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

ungefär 5 år ago | 0

| accepted

Question


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...

ungefär 5 år ago | 1 answer | 0

1

answer

Answered
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.

ungefär 5 år ago | 0

Answered
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);

ungefär 5 år ago | 1

| accepted

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

ungefär 5 år ago | 0

Answered
"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...

mer än 5 år ago | 0

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

mer än 5 år ago | 0

Answered
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; ...

mer än 5 år ago | 0

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

mer än 5 år ago | 1

| accepted

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

mer än 5 år ago | 0

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

nästan 6 år ago | 0

| accepted

Answered
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_...

nästan 6 år ago | 0

| accepted

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

nästan 6 år ago | 1

Answered
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...

nästan 6 år ago | 0

| accepted

Answered
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...

nästan 6 år ago | 0

| accepted

Load more