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

Question


Model Callbacks in Referenced Models
I see inconsistent behavior in the execution of model callback functions in model references. Should the model callback functio...

13 years ago | 1 answer | 1

1

answer

Question


Using RandStream objects in mask initialization code
Is it possible to use a RandStream object in mask initialization code? For example, in the mask initialization, I'd like to be ...

13 years ago | 1 answer | 1

1

answer

Answered
Discrepancy between using function 'feedback()' and calculating manually
cl2 can be simplfied by canceling s out of the numerator and denominator of each entry. After that you'll see that cl2 and cl1 ...

15 years ago | 0

| accepted

Answered
Is it possible to calculate and hold a value constant during the Simulink calculation
Put the calculation inside a triggered subsystem and make the output of the system the desired calculated value. Trigger the sub...

15 years ago | 1

| accepted

Question


Why does EMLMEX generate a slow mex file?
I have an eml-compatibile m-function that I converted to a mex file using emlmex. The m-function takes about 0.11 seconds to ru...

15 years ago | 3 answers | 0

3

answers

Question


What makes Rapid Accelerator regenerate code?
I have a very simple model containing a top model and two Model blocks that reference the same model. When I run with Rapid Acc...

15 years ago | 1 answer | 0

1

answer

Question


How can I control signal logging in referenced models?
AFAIK, the only way to control signal logging in a referenced model is by right clicking on the model block and pulling up the M...

15 years ago | 2 answers | 0

2

answers

Question


Can the value of a parameter in a model workspace be determined programatically and not dirty the model workspace?
The only way I know of to determine the value of a parameter in the model workspace is like this: hws = get_param('mymodel','...

15 years ago | 1 answer | 1

1

answer

Question


Is the Model Workspace dirty?
Is there a programatic way to determine if the model workspace is dirty, which is indicated by an asterisk next to "Model Worksp...

15 years ago | 2 answers | 0

2

answers

Question


How can I log signals in referenced models while running rapid accelerator?
Is it possible to log signals in referenced models in Simulink when the simulation is running under rapid accelerator? As far a...

15 years ago | 1 answer | 1

1

answer