Answered

A and B must be floating-point scalars.

Hello, You need to replace i = integral (fun, x, 0, t); to one of variants below: If you want to integrate in x range (from x(...

A and B must be floating-point scalars.

Hello, You need to replace i = integral (fun, x, 0, t); to one of variants below: If you want to integrate in x range (from x(...

28 days ago | 0

| accepted

Question

Can I mark block as 'algebraic loop breaker'?

Hello, I create block which implement time shift in signal for some steps but Simulink decides that there is algebraic loop wit...

28 days ago | 0 answers | 0

Answered

Insert number in polynomial

Hello, You need to replace f= @(x)p; by f = symfun(p,x);.

Insert number in polynomial

Hello, You need to replace f= @(x)p; by f = symfun(p,x);.

1 month ago | 0

Question

Using complex structure in simulink constant block

Hello, I know that there is way to pass structure to simulink model as bus object but what should I do if i need to pass comple...

1 month ago | 1 answer | 0

Question

Force output for function with no output

Hello! I am working with function handles and get error because function does not return anything. Can I force any function to ...

5 months ago | 1 answer | 0

Question

Run VBA code in MS Office through COM

Hello, I need to take some data from program through COM but that program does not working with Matlab correctly. However tha...

10 months ago | 0 answers | 0

Answered

How i can call matlab basic function if that name is accotiated with couple of functions?

The simplest way to do that is use that code: varargout = builtin('diff',varargin{:}); Also you can looking for somethin...

How i can call matlab basic function if that name is accotiated with couple of functions?

The simplest way to do that is use that code: varargout = builtin('diff',varargin{:}); Also you can looking for somethin...

1 year ago | 0

| accepted

Question

How i can call matlab basic function if that name is accotiated with couple of functions?

Hello, I need to call function |diff| (differences between array elements) for array of symbolic variable but matlab is using...

1 year ago | 2 answers | 0

Answered

How to solve det(s^2*M+s*C(s)+K)=0 for s as fast as posible

You can try to use that code from <https://www.mathworks.com/matlabcentral/fileexchange/67052-matlab-scripts there>: A=Ga...

How to solve det(s^2*M+s*C(s)+K)=0 for s as fast as posible

You can try to use that code from <https://www.mathworks.com/matlabcentral/fileexchange/67052-matlab-scripts there>: A=Ga...

1 year ago | 0

Solved

Bottles of beer

Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

1 year ago

Answered

Help reducing memory usage during large matrix multiplication

I think that problem can be solved by the manual multiplication of matrices. %note: V2=(V2-I*C) is the same V2(172)=V2(172)...

Help reducing memory usage during large matrix multiplication

I think that problem can be solved by the manual multiplication of matrices. %note: V2=(V2-I*C) is the same V2(172)=V2(172)...

1 year ago | 0

Answered

How I can fix this "Signal Dimension" error message ?

You may use |Simulink/Signal Attributes/Signal Specification block|. Specify number of dimensions like that is shown on the pict...

How I can fix this "Signal Dimension" error message ?

You may use |Simulink/Signal Attributes/Signal Specification block|. Specify number of dimensions like that is shown on the pict...

1 year ago | 0

Solved

Model a mass spring system

Model an ideal mass-spring system shown below where the spring is initially stretched. <<http://blogs.mathworks.com/images/se...

2 years ago

Solved

Make a full wave rectifier

Produce a full wave rectifier waveform for the given sine wave source. For a sine wave input, the output of the full wave rec...

2 years ago

Solved

Make a half wave rectifier

Produce a signal that outputs the given sine wave source when it is greater than zero and outputs zero when it is less than zero...

2 years ago

Solved

Add offset to a signal

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-offset-eqn.png>> You should see a downward...

2 years ago

Solved

Produce a sine wave

Produce a sine wave with amplitude 3: <<http://blogs.mathworks.com/images/seth/cody/sine-eqn.png>>

2 years ago

Solved

Add a block to a model

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-block-eqn.png>> In this case, the slope of...

2 years ago

Solved

Produce a cosine wave

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/cosine-eqn.png>>

2 years ago

Solved

Connect blocks in a model

Connect the blocks in the model to produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/connect-blocks...

2 years ago

Question

Window appears while code is runnig

Hello, I'm trying to create library with some |SimPowerSystem| blocks. When I use blocks from my library in |Simulink| model ...

2 years ago | 0 answers | 0

Answered

How can I have a timed (15 minutes) output signal based on external trigger? I want to generate an output HIGH signal for 15 minutes based on a event detection impulse signal.

Hello, This is the model with standart Simulink blocks. Output from |Switch1| is the desired signal. The |Compare To Const...

How can I have a timed (15 minutes) output signal based on external trigger? I want to generate an output HIGH signal for 15 minutes based on a event detection impulse signal.

Hello, This is the model with standart Simulink blocks. Output from |Switch1| is the desired signal. The |Compare To Const...

2 years ago | 0

Answered

subs( ) command would not work

Hello, you should to reassign variable after substitution: A=subs(A,a,1);

subs( ) command would not work

Hello, you should to reassign variable after substitution: A=subs(A,a,1);

2 years ago | 1

| accepted

Solved

Make a run-length companion vector

Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

2 years ago

Solved

Flag largest magnitude swings as they occur

You have a phenomenon that produces strictly positive or negative results. delta = [1 -3 4 2 -1 6 -2 -7]; Marching thr...

2 years ago

Solved

Given a window, how many subsets of a vector sum positive

Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

2 years ago

Solved

Bullseye Matrix

Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

2 years ago

Solved

Ripping numbers apart!

So you have to "rip" a number apart into individual digits... The end output is a cell. That is if: x = 12345678 o...

2 years ago

Solved

Numbers in extended form

Shhhhhhh. Don't tell my daddy, but I'm borrowing his Cody account so all of you very smart people can help me out. I just star...

2 years ago