Answered
Obtain sample time in Embedded Matlab block
I don't believe you can do this directly but you could use this code in the EML block with a clock as an input: function y ...

13 years ago | 1

Answered
protection techniques for simulink
You can use a <http://www.mathworks.com/help/toolbox/simulink/ug/br6xrii.html protected model reference> with a callback inside ...

13 years ago | 1

Answered
How to implement intermittent contact using SimMechanics (e.g. Geneva wheel)?
You can utilize a <http://www.mathworks.com/help/releases/R2012a/toolbox/physmod/mech/ref/pointcurveconstraint.html point curve ...

13 years ago | 1

| accepted

Answered
is it possible to perform real time processing on matlab..i mean can processing on speech signal be done while i am recording my speech signal?
This can be done in a couple different ways depending on your application. If you want to be able to actively perform this p...

13 years ago | 0

Answered
How to disable RTW builds invoked by non-script means
You may be able to disable CTRL-B utilizing: File -> Preferences -> Keyboard -> Shortcuts and un-assinging the CTRL+B command...

13 years ago | 0

| accepted

Answered
position and resize a scope by line command
I'm not sure what you mean with gain slider but this will help with the scope. hScopes = findall(0,'Tag','SIMULINK_SIMSCOPE...

13 years ago | 2

| accepted

Answered
Having problems building custom block
On line 36 you set vf = 0; With no units. I believe that is why vf.der is 1/s instead of in^3/s. To resolve this you ...

13 years ago | 1

| accepted

Answered
Output switch in Simulink
You can use a <http://www.mathworks.com/help/toolbox/simulink/slref/randomnumber.html random number generator> to trigger 4 diff...

13 years ago | 2

| accepted

Answered
How to use Bit Set block in Simulink?
See this <http://i.imgur.com/YPqR4.png demo image> for a rough example of how you can convert each binary digit independently ba...

13 years ago | 2

Answered
Change/reset initial state values in a level 2 C-mex S-function
If you wrote or have the c-code for the s-function you can simply add another input and write a conditional to reset the data wh...

13 years ago | 0

| accepted

Answered
How effective is multi-core machine running Matlab/Simulink these days (2012)
Multi-core operations in MATLAB/Simulink are typically done more explicitly utilizing tools such as the <http://www.mathworks.co...

13 years ago | 0

Answered
Phase retrieval method using continuous wavelet transform?
You can check out <http://www.mathworks.com/products/wavelet/examples.html?file=/products/demos/shipping/wavelet/wcoherdemo.html...

13 years ago | 0

| accepted

Answered
Matlab coder: Generate C file from a m file with an internal mex file
1) <http://www.mathworks.com/help/toolbox/eml/ug/bq1h2z7-11.html Alphabetical list of supported functions> including limitations...

13 years ago | 1

Answered
how to change body's mass when model is simulating?
I'm not sure what the implication with the s-function is, however, there is the <http://www.mathworks.com/help/toolbox/physmod/m...

13 years ago | 1

Answered
How can I discretize a plot using Matlab
You can utilize the <http://www.mathworks.com/help/techdoc/ref/stairs.html stairs> function to plot data without interpolating b...

13 years ago | 0

Answered
Simulink "To Workspace" is outputing 3D array, why?
In the constant block for the 13, check the Interpret Vector Parameters as 1-D checkbox.

13 years ago | 1

| accepted

Answered
Huge different between MatLab and operating systems?
If you are running a 64-bit version of MATLAB you need the s-function to be compiled for 64-bit MATLAB. The extension on the me...

13 years ago | 1

| accepted

Answered
Using Simulink signal as a function variable (Real time Control System)
You need to make sure the P and I gains are <http://www.mathworks.com/help/toolbox/simulink/sfg/f4-108799.html#f4-33602 Tunable ...

13 years ago | 2

Answered
Create a 4-pole, 300-6000HZ bandpass butterworth filter?
If you look at the documentation it mentions you can define a 2 element frequency vector that you need to normalize to the sampl...

13 years ago | 0

Answered
How to use "Load from workspace => Initial state" option to initialize state variables of s-function
You can use the following function to utilize the SimState with an s-function: <http://www.mathworks.com/help/toolbox/simulin...

13 years ago | 2

| accepted

Answered
#Merge and add simulink ???????#
The MERGE block should be utilized with conditionally executed subsystems. If you are trying to merge the if-else on a single l...

13 years ago | 0

Answered
Fixed step discrete time is not really fixed in Simulink
The Simulink blog has a post that describes this behavior in pretty good detail <http://blogs.mathworks.com/seth/2012/02/09/usin...

13 years ago | 5

| accepted

Answered
How does linmod2 order the states when the mdl contains a ss-block
You can use the <http://www.mathworks.com/help/toolbox/slcontrol/ug/linearize.html Linearize> command to obtain a state space sy...

13 years ago | 0

| accepted

Answered
Copy matlab Simulink SUBSYSTEMS and SFUNCTIONS to another model
You can copy the blocks you find directly without the copy contents function. For example: add_block(NoOfNonMaskedSubsys...

13 years ago | 2

| accepted

Answered
Two point hold pendulum with damping
I would use simmechanics. http://www.mathworks.com/products/simmechanics/ I'm not sure how you can do a rope. Probably co...

13 years ago | 1

Answered
How to avoid algebraic loops in model?
Here are some good tips for algebraic loops: <http://blogs.mathworks.com/seth/2010/04/29/causes-of-algebraic-loops/ Causes of...

13 years ago | 2

Answered
simulink model for electrically heated tube
To find out which one works best simply implement each one in Simulink and log the current to the heater. Compare this for all ...

13 years ago | 1

Answered
mex -setup does not see a C++ compiler
It does not appear to be a supported compiler. See <http://www.mathworks.com/support/compilers/R2012a/win64.html here>. Alth...

13 years ago | 0

Answered
ASBHL20 Model Run Problem
It looks like the model is generating code for some of the components but cannot find or execute the batch file it created. Thi...

13 years ago | 0

Answered
How can I run a Lego Mindstorms robot without the Simulink model option "Run on target hardware"?
If you already have installed the Lego kit you could try: Go to Simulation -> Configuration Parameters Click the Code Ge...

13 years ago | 0

Load more