Answered
What frustrates you about MATLAB? #2
The documentation. I hate to say that because I do think that TMW puts a lot of effort into the documentation, which makes it a...

6 years ago | 2

Answered
What frustrates you about MATLAB? #2
When the debugger stops at a breakpoint, why does the focus and cursor go to the breakpoint, as opposed to the command line? I a...

6 years ago | 2

Answered
Number of necessary time steps to handle a Zero-Crossing?
I will speculate on what is happening here. One comment applicable to all three cases is that none of the models involve states...

6 years ago | 0

Answered
Block parameter and values in simulink
get_param(gcb,'DialogParameters') That function returns a struct with all of the dialog parameters for the current block. Or re...

6 years ago | 0

| accepted

Answered
Why is my MATLAB's bode plot wildly off?
How do you know what the correct Bode plot is that your taking as your reference for comparison? Basically repeating from Star'...

6 years ago | 0

Question


Why Do Some Blocks in the Discrecte Library Not Have a Sample Time Parameter?
The doc page "Blocks for Which Sample Time is Not Recommended" has a section "Appropriate Bocks for the Sample Time Parameter" t...

6 years ago | 1 answer | 0

1

answer

Question


Why is a Number Divided by Itself Not Equal to Unity?
w=0:(pi/100):pi; w = w([17 66 93]); x = exp(1i*w); x./x ans = 1.0000e+00 + 4.8645e-17i 1.0000e+00 - 4.9461e-17i ...

6 years ago | 1 answer | 2

1

answer

Answered
why freqz with b [1] is different from freqz with b [1,0]
They should be equivalent and it appears that they basically are: >> which freqz -all C:\Program Files\MATLAB\R2019a\toolbox\s...

6 years ago | 0

| accepted

Answered
Strange behaviour of step response (unstable system)
When you do transfer function math like this, matlab doesn't attempt to deal with poles and zeros that should cancel. Then you c...

6 years ago | 2

| accepted

Answered
Integrator State Port: Why is its use restricted?
Only answering the third, supplementary question .... I think I was able to do what you want without using integrator reset at ...

6 years ago | 0

Question


Should mvnrnd Always Advance the State of the Global Stream
Consider the following: >> mu=[1 1]; Sigma=eye(2); rng('default') preu1 = rand(1,3); n1 = mvnrnd(mu,Sigma); u1 = rand(1,3);...

6 years ago | 1 answer | 0

1

answer

Answered
freqresp gives wrong output for purely real inputs
evalfr evalutes the transfer function at the value of the input argument, which can be an arbitrary complex number. For your exa...

6 years ago | 1

Answered
using ss2tf command
Are you sure f is known? It looks like f is the input to you system, in which case your B matirix should be B = [0;1/m] You di...

6 years ago | 0

Question


Is There a Way to Execute splitapply Functionality on Subtables of Master Table?
Suppose I have a function that operates on a table and returns a row vector: function rowvec = myfunc(Table) Suppose I have a ...

6 years ago | 1 answer | 0

1

answer

Answered
How can I programatically change the transfer function of an LTI block in Simulink and then linearize the system?
Not sure why you're getting that error message, but it seems you can use a simple approach altogether. Just set the 'LTI system...

6 years ago | 0

Question


How Do I Use a Structure as the Value in a Constant Block to Form a Bus?
I have a Simulink model with a Constant block feeding a scope. The Contant Value parameter is set to foo, a struct defined this ...

6 years ago | 1 answer | 0

1

answer

Question


Why Does Simulink Model Sometimes Pause Unexpectedly?
I have a Simulink model that very occasionally decides to pause on its own. As far as I know, I don't have anything in the mode...

6 years ago | 1 answer | 0

1

answer

Question


How do I Trace a Warning in the Simulink Diagnostic Viewer to the Block that Generated It?
I'm running my simulation and I get the following warning in the Diagnostic Viewer: Altitude is out of range. Valid altitudes a...

6 years ago | 1 answer | 0

1

answer

Question


Why does changing a Subsystem Variant cause code regeneration/recompilation and are there any alternatives?
When Subsystem Variants (and Model Reference) variants first arrived, it was apparent that changing the active variant would cau...

11 years ago | 0 answers | 0

0

answers

Solved


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

13 years ago

Solved


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

13 years ago

Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

13 years ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

13 years ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

13 years ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

13 years ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

13 years ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

13 years ago

Solved


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

13 years ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

13 years ago

Question


Using Masks inside referenced models
The doc page here: <http://www.mathworks.com/help/releases/R2012a/toolbox/simulink/ug/bqonbts-1.html> says: "To use a mask...

13 years ago | 1 answer | 1

1

answer

Load more