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
3 answers

s-function in simulink MATLAB

I'm getting message Error in S-function 'project1_simu/S-Function': S-Function 'chiu_sfcn' does not exist whenever i run my simulink file which contains s-function block diagram. Any tips to resolving this problem?
rina
  • 55
  • 1
  • 1
  • 10
3
votes
0 answers

water tank modeling in simscape

I want to model a simple tank with water flowing out of it. Which has level sensor and connected to a controller. When the sensor gets activated(means minimum value of tank has been reached), it sends signal to Actuator to stop the outflow. I have…
3
votes
4 answers

How can I catch all warnings during a Simulink simulation?

I want to catch all warnings issued during the simulation of a Matlab/Simulink model. The result of simulation should be an array of warnings, as there might be more than one warning. The ideal code would look something like this (except that catch…
ChrisK
  • 315
  • 4
  • 15
3
votes
2 answers

How can I call an m file in Simulink and put it to a block in my model?

How can I call an m file in Simulink and put it to a block in my model (without using an S function)? Does anybody have an idea? I'd really appreciate it.
Ali
  • 31
  • 1
  • 1
  • 2
3
votes
1 answer

Matlab, Simulink, Making connection between multiple simulink models via Lan

There is a Simulink model composed of some subsystems, It is supposed to run each subsystem in a computer and all computers are connected to a LAN network. There are interconnections between these subsystems and data shall be transferred between…
Narsis
  • 31
  • 1
  • 2
3
votes
3 answers

How can a Simulink model discover it's own filename and path?

I would like to display some information about a Simulink model, without first knowing the filename. The information will be displayed in the model itself. Something similar, mfilename, is available for MATLAB programs. Is there an equivalent for…
Craig
  • 991
  • 1
  • 13
  • 28
3
votes
0 answers

Passing a string array as parameter in s-function

I'm creating a C++ mex function using the S-function builder option in simulink (matlab). I've successfully captured strings passed as a dialog box parameter in Simulink as: Simulink block dialog: Parameter : uint8('This is a…
magni
  • 31
  • 1
3
votes
0 answers

Simulink Code Generation C++ get signal values from Scope

I have a Simulink model from which I generate C++ to Visual Studio. The Simulink model has a scope block at the end of the calculations, which gets two signals whose values interest me in C++ Now I have searched the C++ Code for these two signals,…
MerklT
  • 803
  • 7
  • 18
3
votes
0 answers

Simulation terminated because derivative is not finite

I encounter this error when I try to run my Simulink application. Derivative of state '1' in block 'proiect/Filtru/Integrator' at time 9.6046876340724416E-7 is not finite. The simulation will be stopped. There may be a singularity in the solution. …
user10740425
3
votes
1 answer

Is there an option for a Simulink Scope to display the layout in single column?

I mean like in the picture from below, for example if I'm having more than 4 layouts to have all of them in a single line, not in a matrix. Does anyone know?
user9660660
3
votes
1 answer

set a condition for a switch lower than a certain value

Is it possible to realize the condition <=1 or =1 with any switch of the simulink library?? The idea is to use it for priority. For example the device with the priority 1 should be selected for further signal processing?
check
  • 39
  • 5
3
votes
1 answer

Simulink and MATLAB - When to use a workspace variable vs inport/outport

I'm new to using Simulink, and have been creating some models/libraries that have roughly five inputs and five outputs. As far as I can tell, I can read a variable from the workspace and write it to the workspace in my library, or I can use inports…
Entropy
  • 63
  • 6
3
votes
1 answer

Simulink: Simulation in a debugging-like mode

I have another issue on Simulink: Is it possible to pause a simulation during it's runtime? After building up several steps via "Unit Delay" I want to pause my simulation before the next step is done (for displaying values for the user to see).…
poeschlorn
  • 12,230
  • 17
  • 54
  • 65
3
votes
1 answer

Executing step-by-step a Simulink model from Python

I need to control a Simulink control scheme from an external application, written in Python. What I need to do is to step through the simulation and, at each step, retrieve the output and let the Python application determine the new set of inputs.…
Bianca
  • 149
  • 2
  • 10
3
votes
3 answers

Simulink: Synchronizing and timing

in order to simulate some processes I have a problem with getting a predefined working order of my self modeled blocks. How can I be sure, that for example Block A must be finished before Block B and C start working? The problem is, that some Blocks…
poeschlorn
  • 12,230
  • 17
  • 54
  • 65