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
6
votes
2 answers

Simulink: PID Controller - difference between back-calculation and clamping for anti-windup?

I need to implement an anti-windup (output limitation) for my PID controller. Simulink is offering two options: back calculation and clamping (documentation) which seem to deliver equal results. I know what back calculation is doing mathematically.…
Robert Seifert
  • 25,078
  • 11
  • 68
  • 113
6
votes
1 answer

Create Simulink block for Arduino library like liquidcrystal

I want to use Simulink to create programs for Arduino Uno hardware. But I would like to use existing libraries, like liquidcrystal, to handle output to an LCD display. How can I create an s-function that incorporates the liquidcrystal class file? I…
ashah
  • 193
  • 1
  • 4
  • 15
5
votes
1 answer

TortoiseGit, configure automatic merge tool on per-file-basis

I am using Msysgit with TortoiseGit to manage repositories containing different file types that need special diff and merge tools, including Matlab Simulink files. I have configured these tools in TortoiseGit -> Settings -> External Programs -> Diff…
5
votes
0 answers

Interpolation with pre-lookup

I need to perform many (thousands) of look-up operations, where the break-points in the look-up do not change. A simple example would be, % create some dummy data % In practice % - the grid will be denser, and not as regular % - each page of v will…
Phil Goddard
  • 10,571
  • 1
  • 16
  • 28
5
votes
1 answer

How can I adjust the display of IO ports on a subsystem block in Simulink?

I'm developing an 8-input digital multiplexer in Simulink and created a subsystem which implements a multiplexer operation with 3 enable inputs. I would like to display the input channels (I0-I7) on the left of the subsystem block, the 3 enable…
Kiran
  • 8,034
  • 36
  • 110
  • 176
5
votes
6 answers

What is MATLAB? Does it generate executables?

What exactly is MATLAB/Simulink? I've tried to understand it but have only gotten more confused in the process. I know that you can write programs utilizing high-level industry-specific functions and algorithms but: Is it a runtime where you can…
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
5
votes
3 answers

How to save scope to an image file without using plot?

This condition is very important, because plot stretches my graph in an unacceptable manner.
kspacja
  • 4,648
  • 11
  • 38
  • 41
5
votes
1 answer

Simulink Project dependency management and dependency resolution

What is the best practice for managing dependencies within a Simulink Project when the project is worked on across a team and the project has dependencies on different models and libraries? An parallel example would be when building an application…
John
  • 10,837
  • 17
  • 78
  • 141
5
votes
1 answer

Modeling a floor/ground for a walking robot in Simulink

I'm trying to create a simple model of a body which will then be later controlled. However, I am running into trouble when I'm connecting both legs to the body. What I have done is that I have built the model starting with the left foot, attached to…
Nick
  • 2,862
  • 5
  • 34
  • 68
5
votes
1 answer

switch-case with multiple matches in matlab for code generation

The following code is valid matlab sytax to check whether b matches any elements in a. However, if the code is used for code generation (i.e. simulink) then I get the error: 'code generation only supports cell operations for varargin and…
craq
  • 1,441
  • 2
  • 20
  • 39
5
votes
2 answers

Is there something like a "pre-build" callback function?

I have a Simulink model, the purpose of which is automated code generation. My model uses S-functions (developed by another party), which has hard-coded assumptions about the path. For instance, several external data files are needed, which are…
Rody Oldenhuis
  • 37,726
  • 7
  • 50
  • 96
5
votes
1 answer

Force redraw of model icon

Version: MATLAB Simulink 2010b How can I from code force a model subsystem icon to redraw itself. I have an icon displaying a model setting, however that block is not responsible for changing that setting. When the setting changes I would like to…
J Collins
  • 2,106
  • 1
  • 23
  • 30
5
votes
2 answers

How to recompile model DLL without restarting MATLAB?

I am in the process of developing an SFunction and compiled submodel in Simulink, an SFunction that calls into a DLL compiled using Realtime Workshop. The problem is, once I compile the submodel once, execute it in native Simulink through the…
J Collins
  • 2,106
  • 1
  • 23
  • 30
5
votes
2 answers

How to get location of signal name on signal line (MATLAB/Simulink)

I have some problems about signal name when I set a name to signal. Now I can set and get signal name by set_param(signal_h, 'SignalNameFromLabel', signal_name); and get_param(signal_h, 'Name'); But I can not set or get location of signal name. I…
5
votes
1 answer

Append Signal to Bus in Simulink

Is there anyway to simply append a signal to a bus in Simulink? This doesn't seem to be that difficult, but I haven't found a nice way to do it. I can only think of two ways to currently accomplish this: Select all signals in the bus with a bus…
celestialorb
  • 1,901
  • 7
  • 29
  • 50