Answered
How I can fix this "resolve underspecified signal dimensions." error message ?
There is not enough info in the model to determine the size of "Xc". Double check your code, make sure "Xc" is initialized or as...

2 months ago | 0

Answered
Vectorizing a Simulink Model
Simulink supports vector, so if designed carefully, a single Simulink subsystem could process N velocity and postion to generate...

2 months ago | 0

Answered
Simulink - Saving Base Workspace Variables
There are at least two other ways. Once all the .m files are executed, you can use save() to save the base workspace to a .mat ...

2 months ago | 1

| accepted

Answered
Differences between the two Sample time settings in the MATLAB Function block in Simulink
This is a really good question. I've never noticed it before. I'll provide my take on it. You could contact the Mathworks' tech ...

2 months ago | 0

| accepted

Answered
the use of Integrator block in subsystem
When the sample time is set to be -1, it means the sample time is "inherited".

2 months ago | 0

| accepted

Answered
Is there any initialization block for parameters and constants in simulink model to be used throughout the model ?
Use a Simulink Data Dictionary (.sldd). Start from here https://www.mathworks.com/help/simulink/ug/migrate-models-to-use-dictio...

2 months ago | 0

| accepted

Answered
Simulink If block error "Port 1 must directly or indirectly connect to one If Action Subsystem"
Outport 1 of the If block is also connected to another destination but it was not shown in the snapshot. Dis-connect that branch...

2 months ago | 0

Answered
Convert array of numbers to an array of padded strings
stanums = 7:12; s=sprintf('%02d\n',stanums(:))

2 months ago | 0

Answered
Hello, can someone please help me understand this error?
If the pulse width is 87.85%, then the gap of the pulses will be 12.15%. Then you have to be able to distinguish at least 0.05% ...

2 months ago | 0

| accepted

Answered
How to do Simulink versioning
Mathworks has its own diff tool and it can be integrated with Git. Model Comparison

2 months ago | 1

| accepted

Answered
Creating new variable using different row and column chunks from a matrix
D=rand(29,46); Training1_T= [D(1:14,17:21);D(15:29,32:36)]

2 months ago | 0

Answered
Hello, I need help to resolve this error, please.
Simulink now supports "string" data type. At your Simulink model, press Ctrl+H to bring up the Model Explorer. Navigate to the c...

2 months ago | 0

Answered
Unable to convert the 2021 mdl to 2009b mdl
You can do this, but of course, if there are blocks that are available in R2021b but not in R2009b, then there could be issues. ...

2 months ago | 0

Answered
extract a number N of equally spaced rows within a matrix
M=repmat((1:100)',1,2); N=7; d=M(round(linspace(1,height(M),N)),:)

2 months ago | 0

| accepted

Answered
Hello, could someone kindly assist me in resolving this error?
A Simulink model describes a "data flow". It is different than a "code flow", where "voltage_input" is just a variable stored in...

2 months ago | 0

| accepted

Answered
Algebraic loop error, how to solve?
There is no algebraic loop here. Giving what ever value to DELTA_U(k), "f" can be calculated without problem. If you feed the o...

3 months ago | 0

| accepted

Answered
Ramp rate %/min limiter in simulink
Feed constant value of 0.05 to "up" and -0.05 to "lo". If you want to prevent a value from increasing more than 5% per minute, t...

3 months ago | 0

Answered
I want to access signal data in Subsystem from mask callback without using the base Workspace
Refer to this Q&A. https://www.mathworks.com/matlabcentral/answers/2003487-how-to-plot-simulation-results-in-a-gui-while-the-si...

3 months ago | 0

Answered
Matrix Data Results Explanation
The code looks good and shows good programming flow to use logical index. It will be very lengthy to explain why the result show...

3 months ago | 1

| accepted

Answered
Way to disable Simulink blocks at compile time using a variable in the workspace
This is the exact use case for Variant Subsystems. https://www.mathworks.com/support/search.html/videos/using-variant-subsystem...

3 months ago | 0

Answered
How to use save in matlab function block ?
The MATLAB Function block will be executed at every simulation step, so if save() works, it will create many .mat files, each is...

3 months ago | 0

| accepted

Answered
How to make Simulink read a MatLab variable every 5 seconds?
Use the "MATLAB Function" block to integrate your MATLAB algorithem directly into a Simulink model.

3 months ago | 0

Answered
Multiple output in Switch block
Using your example, just specify the top input as constant [1, 2,3], the bottom input as constant [4,5,6]. The output will be a ...

3 months ago | 0

Answered
graphical visualization of input parameters collected in a struct/array
Use the built-in variable editor is sufficient to visualize struct array. Just run this at the Command Window open params

3 months ago | 0

Answered
How to get values of Scope and Port of "Data data" dialog box using API's?
open_system('sldemo_autotrans'); sf=sfroot; ch=sf.find('-isa','Stateflow.Chart'); d=Stateflow.Data(ch); d.Scope='Output'; d...

3 months ago | 0

| accepted

Answered
Is there a specific standard for the rows and columns of a struct?
It is described in the Help document of struct(). The size of the resulted struct array is the same as the size of the cell arr...

3 months ago | 0

Answered
How can I view under mask of the block "Orbit Propagator"
It does not seem to be a masked block. Double click the 'Attitude Profile (Nadir Pointing)' block, it opens the parameter dialo...

3 months ago | 0

| accepted

Answered
How to plot simulation results in a GUI while the simulation is running?
https://www.mathworks.com/help/simulink/ug/accessing-block-data-during-simulation.html https://www.mathworks.com/help/simulink/...

3 months ago | 1

| accepted

Answered
Turn Off a Lamp Block after 10s
https://www.mathworks.com/help/stateflow/ref/after.html

3 months ago | 0

Load more