Respondida
how to programtically add junctions and default transition in state flow and connect them
transition = Stateflow.Transition(ch); transition.Source = [];% this makes it default transition. transition.Destination = j2;...

más de 2 años hace | 0

| aceptada

Respondida
transform the cell (50x95 cell) into the matrix 'in' (50x95x3 uint8)
cell2mat(out)

más de 2 años hace | 0

| aceptada

Respondida
How to Add several stateflow chart to a exist simulink model programtically
add_block()

más de 2 años hace | 0

| aceptada

Respondida
Record block isn't producing a "recordout" field
"out" is a Simulink.SimulationOutput object. By default, it records the root level outputs. You don't have any Outport blocks. ...

más de 2 años hace | 0

Respondida
Set initial value to decrement from when using a sum block loop in Simulink
Double click the Unit Delay block and set the initial value there.

más de 2 años hace | 0

| aceptada

Respondida
Not suppressable warnings in Simulink
Between fast restart simulations, you have some variables that have changed their values. But these variables are non-tunable. T...

más de 2 años hace | 0

Respondida
open_system() not working with Model Reference
You need to get the name of the referenced model first and then open the model separately. RefModel=get_param('TOP_LEVELSystem/...

más de 2 años hace | 1

| aceptada

Respondida
error using reshape for a specific case
reshape(1:8,4,[]) reshape(1:2,4,[])

más de 2 años hace | 0

Respondida
Displaying peaks' values on a graph
text()

más de 2 años hace | 0

| aceptada

Respondida
The variables in Simulink cannot be displayed in the workspace.
This is because the saving format in the "To Workspace" block is specified as "time series" or "data set". If the variable name ...

más de 2 años hace | 0

Respondida
how to get respective blockpaths in 2 versions of a complex simulink model programmatically
Simulink.BlockPath

más de 2 años hace | 0

| aceptada

Respondida
error using tranpose (recieving permute error )
The error message is clear. How do you transpose a three (or more) dimension array? a=rand(2,3); a'; a=rand(2,3,4); a';

más de 2 años hace | 0

| aceptada

Respondida
Question about signal type - white arrow
That is message. https://www.mathworks.com/help/simulink/ug/simulink-messages-overview.html https://www.mathworks.com/help/sim...

más de 2 años hace | 0

| aceptada

Respondida
Use Indexing for more than 1 dimension of array simultaneously
matrix(sub2ind(size(matrix),(1:10)',idx))

más de 2 años hace | 0

Respondida
Initializing values from workspace using embedded coder
Use the Initilize Function block https://www.mathworks.com/help/simulink/slref/initializefunction.html

más de 2 años hace | 0

| aceptada

Respondida
how do i implement these blocks?
Double click the block in Simulink. The dialog appeared will show the block type. If it's still not clear, click the "Help" butt...

más de 2 años hace | 0

| aceptada

Respondida
Help with comparing strings from cells
A{1,5} itself is a cell. Do the following class(A{1,5}) isequal(char(A{1,5}),'FIRING') A{1,5}{1}

más de 2 años hace | 0

| aceptada

Respondida
i am trying to display the dialog parameters of all blocks in a simulink model. But i am not getting the exact result. Can anyone help me in this?
"paramValue" turns to be a struct. All its field values are struct, so your code ends up running this line for all iterations. ...

más de 2 años hace | 0

| aceptada

Respondida
How to insert an input in a constant in simulink?
Use the "Assignment" block to assign values to specified elements of a multi-dimensional signal.

más de 2 años hace | 0

Respondida
Changing size of variable inside Matlab function in SIMULINK
Use variable size data. It can be done but a little tricky. https://www.mathworks.com/help/releases/R2022b/simulink/ug/declare-...

más de 2 años hace | 0

| aceptada

Respondida
Is there a way to set the default behavior for `format` statement?
no big deal. Put that in a startup.m file Also, set it in MATLAB Preference, Command Window, Text Display

más de 2 años hace | 1

Respondida
Single plot title line with multiple text interpreters?
title( [ 'HSRL2 Ocean b_b_p Retrieval From' , strrep(filenameHBW,'_','\_') ] )

más de 2 años hace | 2

Respondida
how to add several inport to the buscreator
set_param('untitled/BusCreator','Inputs','3'); add_line('untitled','Inport/1','BusCreator/1') add_line('untitled','Inport1/1',...

más de 2 años hace | 0

| aceptada

Respondida
Simulation status is stopped but I cannot start new simulation from script because Matlab assumes it is still running
Might it be too fast to re-start the simulation? There could be some post-simulation processing going on. Anyway, in the M-scri...

más de 2 años hace | 0

Respondida
Is it possible to "Edit table and breakpoints" for a LUT within a masked subsystem?
On the dialog of the Lookup Table block, you provide the variable name to pass to the Lookup Table block. On the dialog of the ...

más de 2 años hace | 0

Respondida
Display without new line
use sprintf() and check "doc sprintf" to learn the % Formatting Operator sprintf('format short: %f',x) sprintf('format short: ...

más de 2 años hace | 0

Respondida
Error Messages keep popping up: "Undefined function or variable"
up case, low case

más de 2 años hace | 0

Respondida
Create a repeating sequence without interpolation
I found it impossible to use the "Repeating Sequence" block due to the "breakpoints must be strictly monotonically increasing" ...

más de 2 años hace | 0

Respondida
Variables are stored but not shown is the workspace?
The variable name "ans" is reserved by MATLAB. type "doc ans" to read it

más de 2 años hace | 0

Respondida
I am unable to understand what's wrong in this code.
if fid < 0 || ~ischar(character) fprintf('-1'); charnum=-1; return end

más de 2 años hace | 0

Cargar más