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

Matlab to workspace and rms value different

I have a very simple circuit in matlab. There is a voltage source of 100 V peak. Both resistance if of 100 ohm. If I see the voltage in display box, it shows 36.476 V But in the TESTV matrix it shows 25.1761 V Why is it different? This is the…
Santosh
  • 1,871
  • 1
  • 19
  • 36
5
votes
2 answers

Programmatically Labeling a Signal in Simulink

I'm attempting to write a script that generate a basic Simulink model and I'd like to know if there's a way to programmatically label a signal line. I've looked at the add_line function (which is what I'm using to add the lines), but I don't see an…
celestialorb
  • 1,901
  • 7
  • 29
  • 50
5
votes
2 answers

Getting the solver type and step size (for fixed step solvers)

we are trying to integrate a simulation model into Simulink as a block. We have a custom continuous block which loads an m file that contains the functions Derivatives, Outputs etc. My question is: is there a way to find out which solver is used…
tks
  • 173
  • 2
  • 6
4
votes
2 answers

Writing comments for Simulink

How to write comments beside the simulink blocks ... is it possible to have text blocks or mouse over for the simulink as I need it for teaching my friend online and also for further self reference?
Raja Tejas
  • 43
  • 1
  • 3
4
votes
6 answers

Modeling and Simulation Programming Language

I work with many different models and simulations. Some of the older models and simulations are written in FORTRAN. Some of those models have been converted to C++, but the current trend is to create these models using MATLAB/SIMULINK. From a…
SchwartzE
  • 2,558
  • 5
  • 30
  • 39
4
votes
1 answer

Obtaining the model topology from a Simulink model

I would like to create a structure in Python which represents a Simulink model. I am aware of at least two ways of doing this - by parsing an ".mdl" file, or by using Matlab's api for communicating with the model. Can you recommend good libraries or…
Felipe Ferri
  • 3,488
  • 2
  • 33
  • 48
4
votes
2 answers

Input data to Simulink from workspace

Hello anyone does know? I have data(myData) from matlab workspace. And in matlab simulink I have to do control system with regulator.First how to put data(myData) to simulink model input,and I want to show in graph two value(myData and regulator).
Mr Min
  • 47
  • 1
  • 2
  • 7
4
votes
1 answer

Access/Call Simulink from Python

I want to model a system in Simulink, and then access that simulation from a python program to feed it new conditions or inputs. I know there is a module out there that allows you to access the Matlab engine from Python, but this is a little…
Michael
  • 281
  • 1
  • 5
  • 12
4
votes
1 answer

Matrix Multiplication of two Complex Vectors in Simulink

Two questions really, But I would like to make it more descriptive : I am implementing a Modulator which involves Matrix Multiplication of complex Vector: Just to give an example : cck_encoding_table(1,:)= [ 1j 1 1j -1 1j 1 -1j 1…
Kiran
  • 8,034
  • 36
  • 110
  • 176
4
votes
1 answer

Simulink Integrator Error when Fixed-step size increased

I downloaded a Simulink model, which I would like to run with a high fixed-step size, because I am more interested in speed than accuracy. ode3: Works until Fixed-step size 3 Everything over Fixed-step size 4 leads to error. (Other solvers like ode8…
Bowers
  • 836
  • 8
  • 20
4
votes
2 answers

Programmatically open a Simulink MATLAB function block's code

Can I open a local Simulink MATLAB function block's code in the MATLAB editor via some command? For example, let us say I have a Simulink model named mainModel.slx. In it, there is a MATLAB function block named localFunction. This is not defined in…
Smartskaft2
  • 468
  • 3
  • 16
4
votes
1 answer

Converting a Decimal to an Integer in Matlab or Simulink. (Not Rounding)

So this maybe an easy question. I have some incoming decimal .12345 and I want to make that 12345. Now this value can change so I dont want to just multiply it by 100,000. For example if the incoming value was .123 I want 123, If it was .3219 I want…
4
votes
2 answers

Run Simulink from Matlab function

I am running Simulink using FastRestart, as I need to start and stop the simulation multiple times changing parameters. When I run Simulink from the main script, there are no problems. However, as soon as I make the script a function so that I can…
Enrico Anderlini
  • 447
  • 6
  • 21
4
votes
1 answer

How to use syms in Simulink Matlab function block

I want to solve the integral of expm(A*s) between a and b+tau, where tau is time-varying delay. I created in Simulink a Matlab Function block with tau as an input, like this: function y = compute_int(u, tau) syms…
Betelgeuse
  • 682
  • 2
  • 8
  • 27
4
votes
0 answers

Simulink: Possible to connect blocks without creating port to port connection line?

I'm starting on Simulink and just wondering if it is possible to connect two blocks without actually running an explicit connection line from port to port? Because with system getting larger, these connections create too much jumble and mess. Like…
frank_010
  • 97
  • 1
  • 8