Questions tagged [simulink]

Simulink® is an environment developed by The MathWorks for multidomain simulation and Model-Based Design for dynamic and embedded systems.

Simulink® is an environment developed by The MathWorks for multidomain simulation and Model-Based Design for dynamic and embedded systems. It provides an interactive graphical environment and a customizable set of block libraries that let you design, simulate, implement, and test a variety of time-varying systems, including communications, controls, signal processing, video processing, and image processing.

Some useful links:

2873 questions
3
votes
1 answer

Sending double from matlab to java via UDP-packets

I'm trying to send doubles from Matlab(Simulink) to java. This is my code: public static void main(String[] args) throws SocketException, UnknownHostException, IOException { DatagramSocket socket = new DatagramSocket(25000); byte[] buf = new…
wietjes
  • 65
  • 6
3
votes
3 answers

Complex angle calculation with no reset of argument: continuous unbounded angle

Consider the following example Simulink (Download example) system: Input is a magnitude and an ever increasing angle, which will return two sine, the real and imaginary part as expected: Calculating the Magntitude from real and imaginary part is…
Robert Seifert
  • 25,078
  • 11
  • 68
  • 113
3
votes
0 answers

Segmentation in live video in MatLab

Here is model for face detection. Bounding box is to track and detect face. Active contours need to be added to get exact shape of the face not its features. To do this we need to proceed with segmentation of the frames within the video. I applied…
user4564280
3
votes
1 answer

Searching constant value through all Simulink blocks

I have a big Simulink model with a lot of User-Defined MATLAB functions. And I went wrong way - I used some local data in many blocks. For example - water density. I just used 1000 in formulas or some local variables like this: wat_den = 1000; in a…
Mikhail_Sam
  • 10,602
  • 11
  • 66
  • 102
3
votes
2 answers

How can I name signals in Simulink's scope?

I am plotting a lot of signals in one Scope block. Is it possible to name the different signals/figures for a better overview?
Karlo
  • 1,630
  • 4
  • 33
  • 57
3
votes
2 answers

Solving ODEs inside a Subsystem in Simulink

I'm trying to figure out how to solve a system of ODEs inside a subsystem in a Simulink model. Basically, each call to this subsystem, which happens at each tick of the simulation clock (fixed-step), entails solving the ODEs. So there's like a…
Bruno
  • 1,329
  • 2
  • 15
  • 35
3
votes
1 answer

Is it possible to use OpenMDAO for control systems simulation? If so, how?

I'd like to run a Control Systems simulation similar to the one demonstrated here. Since OpenMDAO seems to have nice features of component-based modeling, is it possible to run such a simulation with OpenMDAO? More specifically, I'm trying to…
3
votes
2 answers

How to declare global variables for simulink containing matlab functions?

I'm building a Simulink model with multiple Matlab function blocks. Each of these function blocks has a lot of constants, for example, g = 9.8, common between them. I want to initialize all of these constants in one go so that I don't have to do so…
user10678
  • 139
  • 1
  • 1
  • 10
3
votes
1 answer

Graphic object handle array in embedded matlab function in Simulink in R2014a or newer

For debugging, I have some plots of vectors in an embedded matlab function in Simulink. Up to Matlab R2013b, everything works just fine with the following minimum example code: function fcn %#minimum example for plot within for-loop of embedded…
Bazi
  • 33
  • 3
3
votes
1 answer

Optimization in NMPC of second order pendulum model

Hopefully, I will be able to explain my question well. I am working on Nonlinear model predictive control implementation. I have got 3 files: 1). a simulink slx file which is basically a nonlinear pendulum model. 2). A function file, to get the…
GKS
  • 427
  • 1
  • 5
  • 18
3
votes
1 answer

Load bus definitions in function's scope

How do I use Simulink.Bus.createMATLABStruct inside a function? I'm loading some bus definitions in the function's scope but createMATLABStruct doesn't see those. If I load the bus definitions in the global workspace then the function works. Doesn't…
remus
  • 2,635
  • 2
  • 21
  • 46
3
votes
2 answers

how can i turn off the check model before generating code programatically

I want to turn on/off the parameter check model before generating code (shown below) through Matlab script. how can I achieve this? I am not finding the parameter name for that property.Any kind of help is appreciated. Usually when I want to change…
Sandeep Bhat
  • 315
  • 5
  • 13
3
votes
1 answer

Doing Integration Testing on Simulink Models

Say, I've UNITs 1,2,3,4 ( either as Model reference or Subsystem) for which I've units tests ready using matlab.unittest.TestCase framework. What could be the easiest way to write integration test fro entire system ? I need some way to set…
P0W
  • 46,614
  • 9
  • 72
  • 119
3
votes
0 answers

Simulink Model restore default configuration

I've made some unwanted changes to some reference models of 'sldemo_concurrent_execution' example and want to restore default configs. I've executed: sldemo_mdlref_util('sldemo_concurrent_execution','close') but it did restore default config sets of…
Farzad M.
  • 159
  • 3
  • 14
3
votes
1 answer

Jump from command window to simulink model block

How can I create a link in Command Window for a block in a simulink model? I found something like this: disp('Generate magic square') and that is possible to use href to jump to a line in a m-file. WHat is the…
Eagle
  • 3,362
  • 5
  • 34
  • 46