Respondida
How to pick a random number from a set of numbers in simulink?
The MATLAB Function block is like any other blocks. It will execute at every simulaiton step. The best way is to put this MATLA...

alrededor de 2 años hace | 0

Respondida
Help with State Transition Table
[0<distance<10] is not the correct syntax. Your state stays at the default. changing all to style [0<distance && distance<10] s...

alrededor de 2 años hace | 0

Respondida
Data 'gestureType': Character outputs are not supported in Simulink and Stateflow. Cast 'gestureType' to int8 or uint8 instead.
MATLAB Function block does not support 'char' data type, so you can't write y='abc' for example. But since R2019b, it supports ...

alrededor de 2 años hace | 0

Respondida
Pass a plot handle into a function argument
figure(1) xx=linspace(-pi,pi,100); yy=sin(xx); plot(xx,yy,'r-','DisplayName','sinus'); legend; hold on; % then plot a se...

alrededor de 2 años hace | 0

| aceptada

Respondida
Breakpoint in Simulink MATLAB function block not working
Try sim("modelName","Debug","on")? https://www.mathworks.com/help/simulink/slref/sim.html

más de 2 años hace | 0

Respondida
Sample Time from To Workspace not precise
If you use a ZOH block to measure the signal and specify the sample time of the ZOH block as Ts, then specify the sample time fo...

más de 2 años hace | 0

| aceptada

Respondida
Cannot load a Mat file into Simulink
Most likely due to incorrect data format. Look at this page under "Load Array Data" section. https://www.mathworks.com/help/sim...

más de 2 años hace | 0

| aceptada

Respondida
How can I find out the data type in the Simulink?
Click "Edit data" in the MATLAB Function block editor, you can set the data type of any data (input, output, data, etc.). Make s...

más de 2 años hace | 0

Respondida
Extract variables saved to workspace from simulink
I would suggest you saving the data in time series format and use API to process it. https://www.mathworks.com/help/matlab/time...

más de 2 años hace | 0

| aceptada

Respondida
Simulink Scope viewing problem
Is the data points limited? Check "View", "Configuration properties", "logging"

más de 2 años hace | 0

Respondida
Delaying Signal Builder Start in Simulink
This can be done through an 1-D lookup table. The trick is the input. Use your Switch output to enable an Enabled SubSystem bl...

más de 2 años hace | 0

Respondida
3-D Simulation Vehicle Ground Following
set_param('mcityMonoCamera/Simulation 3D Vehicle with Ground Following','LeftHeadlightOrientation','[15 0]')

más de 2 años hace | 0

Respondida
Unable to extract time and data from simout MATLAB
As it indicates in the Simulink model, the data is saved in "out.simU". So, add "simX=out.simX;simU=out.simU;" in front of your ...

más de 2 años hace | 0

Respondida
Delaying Signal Builder Start in Simulink
Try to put the Signal Builder block inside an Enabled Subsystem block.

más de 2 años hace | 0

Respondida
How can I change the Debounce time in Stateflow?
Typically, the value "5" in the two "after(5,sec)" statements is the time that the switch state needs to stay (without bounce) b...

más de 2 años hace | 0

Respondida
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...

más de 2 años hace | 0

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

más de 2 años hace | 0

Respondida
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 ...

más de 2 años hace | 1

| aceptada

Respondida
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 ...

más de 2 años hace | 0

| aceptada

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

más de 2 años hace | 0

| aceptada

Respondida
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...

más de 2 años hace | 0

| aceptada

Respondida
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...

más de 2 años hace | 0

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

más de 2 años hace | 0

Respondida
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% ...

más de 2 años hace | 0

| aceptada

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

más de 2 años hace | 1

| aceptada

Respondida
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)]

más de 2 años hace | 0

Respondida
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...

más de 2 años hace | 0

Respondida
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. ...

más de 2 años hace | 0

Respondida
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)),:)

más de 2 años hace | 0

| aceptada

Respondida
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...

más de 2 años hace | 0

| aceptada

Cargar más