Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

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

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

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

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

14 years ago

Answered
Way to determine Look-up table values from input/output data
The <http://www.mathworks.com/products/curvefitting/ Curve Fitting Toolbox> is ideal for this sort of thing, but I've also used ...

14 years ago | 0

Answered
return variable of Sim() command
The syntax that you are using was introduced in R2009b. If you're using R2009a or an older release, the second parameter needs t...

14 years ago | 0

| accepted

Answered
COM Component for C#
Yes, the end users to need to have the MCR installed on their machines. Typically, developers use the "Add MCR" option on deploy...

14 years ago | 0

Answered
Data transfer from matlab to simulink and back
Since simulation is time-based, Simulink does require inputs to have time-stamps associated with them. You can use the Constant ...

14 years ago | 0

| accepted

Answered
Cross-compiling 32-bit C application on machine with 64-bit MATLAB installed
You need to install the 32-bit version of MATLAB also. See <http://www.mathworks.com/support/solutions/en/data/1-579TVF/index.ht...

14 years ago | 0

| accepted

Answered
MPC Block
You need to verify with your system administrator if they have purchased a license for the Model Predictive Control Toolbox. Onc...

14 years ago | 0

Answered
can't run MEX files on Matlab 7.10 (R2010a)
Assuming that you have already followed James' advice and are running the mex compilation command from the directory where the f...

14 years ago | 0

Answered
Matlab Simulink
Run "mex -setup" and select a supported compiler that Simulink can use. Then run the model again. Also, ensure that you have alr...

14 years ago | 0

| accepted

Answered
linking simulink from m-file
To call MATLAB code from a Simulink model, use one of the three <http://www.mathworks.com/help/toolbox/simulink/ug/bq3qblc-1.htm...

14 years ago | 2

| accepted

Answered
Mex & shared library
This is what you are doing: y = mxGetPr(plhs[0]); y = timestwo(x); The function timestwo overwrites the input poi...

14 years ago | 1

Answered
Discrete systems using s-function
Is (k-1) basically "t" at the previous step, where t is the current simulation time-step? If yes, you can store "t" in a Dwork b...

14 years ago | 0

| accepted

Answered
How to Create a Video from a MATLAB Code?
Do you mean that you want to create plot animations? If yes, see http://www.mathworks.com/help/releases/R2011b/techdoc/creating_...

14 years ago | 0

Answered
why do I always get this errors when I run Matlab after having installed the connector
Try following the instructions given in the Technical Solution <http://www.mathworks.com/support/solutions/en/data/1-2T7SE0/inde...

14 years ago | 0

Answered
Simulink block in GUI
Yes - assuming you mean that the GUI needs to control the parameters of the Simulink model. See an example <http://www.mathworks...

14 years ago | 0

| accepted

Answered
testing MATLAB dll using mbuild
<http://www.mathworks.com/help/toolbox/compiler/bskcb6d-1.html#bsojj2r This page> seems to suggest that MATLAB Compiler "creates...

14 years ago | 0

Answered
Virtual Bus as model input
I think you need to convert the virtual bus to a non-virtual bus to be able to input it to a referenced model. Right-click on yo...

14 years ago | 0

| accepted

Answered
Line stile for virtual bus missing
Try turning on Format>Port/Signal Displays>Wide Nonscalar Lines.

14 years ago | 0

| accepted

Answered
MATLAB CODE TO C CODE
Perhaps you are not specifying the correct compiler options? Make sure to use the codegen -v (verbose) option to see the exact c...

14 years ago | 0

Answered
MATLAB R2011b “Code Generation Advisor”, and How to write TLC?
"As a result of which the existing code gen scripts are encountering many issues." - this is not enough information for us to pr...

14 years ago | 0

Answered
TLC debugging without Simulink Coder (RealTime Workshop)
It's not easy to guess what's going wrong with the available information - something about the way the S-function is written pro...

14 years ago | 0

Answered
Simulink input output from m file
I suppose you could use the <http://www.mathworks.com/help/toolbox/simulink/gui/bq7cpr_.html#bq7cpvk-1 Input> parameters to spec...

14 years ago | 0

| accepted

Answered
S-function error: not enough input arguments
Have you set the S-function parameters field in the block dialog window to "Cout,angInit" (without the quotes)?

14 years ago | 1

Answered
simulink addition block error
Did you try following the instructions to specify signal dimensions on one of your blocks (maybe on the Inport block)? Alternati...

14 years ago | 1

| accepted

Answered
How to get a SimStruct * from a block path?
I don't this it is possible get the SimStruct* based on the block path. However, if you specify the block path in the error mess...

14 years ago | 0

| accepted

Answered
arduino simulink build error
It looks like the version of the package you have installed was developed for MATLAB R2011b, which contains the function Simulin...

14 years ago | 0

Load more