Questions tagged [simulink]
Simulink® is an environment developed by The MathWorks for multidomain simulation and Model-Based Design for dynamic and embedded systems.
simulink
2,908
questions
0
votes
0
answers
16
views
Fail to build FMU during code generation in Matlab using CATIA-Systems / FMIKit-Simulink
I am trying to create a model exchange FMU using your the tool 3.1 in Matlab 2021a. I am generating rtwsfcnfmi.tlc target. Always I get this:
The call to rtwsfcnfmi_make_rtw_hook, during the ...
0
votes
0
answers
21
views
Is it possible to implement PDEs with 'pdepe' inside a simulink scheme?
I want to implement a model in simulink, but this model requires to solve a system of PDEs. How can I implement it knowing that in the equations there are parameters that varies according to time and ...
0
votes
0
answers
29
views
Issues with values expected as scalar but with undefined row number
I am currently writing a matlab function that I have embedded in a simulink model.
Now when compiling I get the error message that simulink expect indx_p11 to be a scalar but it is a [:?,1] where I ...
0
votes
0
answers
14
views
How can I have a table from workspace as input to a Function Caller block
I have a table stored in the workspace. For this table I have defined several functions to read and post process the data contained in this table.
Some of these functions I want to use in a Simulink ...
0
votes
1
answer
41
views
Matlab Simulink Function Block: Calling Non-supported Functions
I have a code that uses optimvar and optimproblem functions that i have made in a .m file and that i want to recreate fur use in a simulink model to be used in a real time model.
Unfortunately the ...
-4
votes
0
answers
31
views
Using Peltier Module to control temperature in Simulink
I am trying to simulate 3 Peltier Module cooling a 23 cm x 20cm x 20cm Peltier Cooler box in simulink, the peltier cools the box too fast like in 2 seconds, so I am very confused with my calculations.
...
1
vote
1
answer
55
views
Share Python object between blocks in Simulink
I have created a class in Python. In my application this class is a kind of lookup table.
Here is a sample class to illustrate the topic :
class ExampleClass:
def __init__(self, var1):
...
1
vote
1
answer
29
views
How to implement a copy of a subsystem but with different values for constants
I am currently developing a model of a flow through a pipe that I have stored in a subsystem and that I want to use several times inside a larger model as it shall have several pipes in it.
I use some ...
1
vote
0
answers
41
views
Implementing Continuous Averaging Memory for White Noise Signal in Simulink
I'm currently working on a project where I need to develop a continuous averaging memory to compute the average frequency spectrum of a white noise signal. The goal is to achieve a Degree of Freedom (...
0
votes
0
answers
26
views
assignin() is not working inside mask initialization code
I am trying to add a Simulink.signal variable in 'base' workspace within a block's mask initialization code using assignin () function. Now, this is quite unsuccessful and to my surprise I am not ...
0
votes
1
answer
25
views
mscorlib Error Occurs when Building Simulink Model using HDL Coder Workflow Advisor
I have a simple Simulink model that I want to build into FPGA code compatible with NI FPGA targets. I have installed the HDL Coder and the HDL Coder Support Package for NI FPGA Targets.
When I try ...
2
votes
1
answer
112
views
Simulink: Error in port widths or dimensions when passing matricies to model
I am trying to create a simulink model that does a few matrix multiplications but I cant seem to get the inputs right.
This is the setup of the model. Wind and gravity are 3x1 vectors and DCM is a 3x3 ...
0
votes
0
answers
28
views
Inconsistent code generation of Block parameters with Embedded Coder
I'm trying to generate C++ code via Embedded Coder.
This simple model contains some variables a,b,b1, where their constant values are implicitly set under .mat file
This is one of the block ...
0
votes
0
answers
18
views
control systems optimization multiple factors
I am working on a regulation for a vehicle. I have the following formula for the signal processing of the signals that go into the controller:
heightDiff = k1*A + k2*B + k3*C
I can vary the pre-...
0
votes
0
answers
22
views
Simple Stateflow model is not functioning
I have designed a basic State-flow model. When I'm trying to run the model, I'm getting an error message
Invalid connection from output port 1 of constant to Input port, Ports are not compatible and ...