Answered
simBiology exported model simulation output not in the same order as `InitialValues`
For a Simulink simulation, there are Inputs, Outputs and States. Usually, only States need initial values. From "exported_mode...

3 years ago | 0

Answered
step function gives Error using step Not enough input arguments.
Not the correct way to use step(). It is used to get the step response of a system, not to get the step input signal. You can u...

3 years ago | 0

Answered
Is there a way to get MATLAB Function name defined in Simulink block programmatically ?
myconfig = get_param(gcb, 'MATLABFunctionConfiguration') and parse the text, you might be able to get it. web(fullfile(docroot,...

3 years ago | 1

Answered
Extract specific values from a 3D matrix?
A(sub2ind(size(A),row_index,col_index))=B For example A=false(6,6,6); row_index=[4, 3]; col_index=[4,5]; B=[true;true]; ...

3 years ago | 0

Answered
Function variables are resolved in the workspace, not a .Simulink.Signal. object
In the MATLAB Function block editor, click menu button "Edit Data", in the "Property Inspector", "Symbols" section, find and sel...

3 years ago | 0

| accepted

Answered
Output sizes for MATALB function block in Simulink.
It is interesting that you want to do this. Does the solution "B" always exist? How many solutions are there and are there alway...

3 years ago | 1

| accepted

Answered
Workspace variable and simout
Your question is too generic. It's better to give specific example or block usage. A "parameter" of a block is meant to be cons...

3 years ago | 0

| accepted

Answered
How to open a saved figure?
If you have the figure saved in a .fig file, I think it should be open('file/subfolder/fighandle.fig')

3 years ago | 0

Answered
Is there a figure tab in desktop matlab (R2022b)?
If you are talking about the "PLOTS" tab, yes it is there. https://www.mathworks.com/help/matlab/learn_matlab/desktop.html

3 years ago | 0

Answered
Can I use another filename instead?
Yes and it's better.

3 years ago | 1

Answered
Array operations on simulink math function for maximum efficiency
Instead of using "For Iterator Subsystem" block and "Math Function" block, I would suggest using the "MATLAB Function" block. ...

3 years ago | 0

| accepted

Answered
Is there any method to import the ecg samples(.mat file) in simulink and display the signal into the scope
From File block See example model in the doc

3 years ago | 0

Answered
compare 2 consequtive columns ?
data=[3 3 4 4 5 5 6 6 5 5 8 8 9 9 7 7 2 2]; index=diff(data,1,2) index2=any(index) output=sum(index2) OutData=data...

3 years ago | 0

| accepted

Answered
Get signal lines in a linked library in Simulink
Not sure if "link1.slx" is a model/subsystem or a library, which results in a subsystem reference or a library link. In any cas...

3 years ago | 1

Answered
identifying entry elements in rows of logical matrix
in = [1 1 1; 0 1 1; 0 0 0; 0 1 0]; M=size(in,1); temp=[zeros(M,1), in]; d=diff(temp,1,2); out=(d==1)

3 years ago | 0

Answered
How can we resolve the error caused by - Dictionary entry value class 'DATA.Signal' is undefined ?
It seems like DATA.Signal is a customized class, for example, built on top of the Simulink.Signal class. Or, it could be a class...

3 years ago | 0

Answered
Simulink - 'MaskPortRotation' is read-only?
If it is read-only, then leave it alone. Don't try to set it. Port Location After Rotating or Flipping Mask Parameters

3 years ago | 0

Answered
Can the descriptions of all Model Advisor checks for R2021a be exported to Matlab workspace?
something like this: Model='f14'; open(Model); ma = Simulink.ModelAdvisor.getModelAdvisor(Model); Checks=ma.CheckCellArray; ...

3 years ago | 0

| accepted

Answered
How to edit .fig (already saved image) in MATLAB?
run "findobj(figld)" and you will see a list of objects. The general idea is to use findobj() to find the handles of the needed...

3 years ago | 0

Answered
Sending episode number to simulink during training
Try the Constant block and specify the value as trainingStats.EpisodeIndex(1). Read the document of the "From Workspace" block t...

3 years ago | 0

Answered
CAN UnPack block not giving signals names specified by the dbc file
Those signal lines need to be labelled (having a name) so then the names can appear in the BusSelector block. I think the "Unpac...

3 years ago | 1

Answered
Need help on fixing Stateflow model.
First, "d" is not a parameter. You need to change it to be a "local data" and give an initial value, e.g. 0. The error message ...

3 years ago | 0

| accepted

Answered
Detect if user has a valid MatLab license
There are so many ways to specify the license file, I think you need to follow this order specified in "MATLAB License Search Pa...

3 years ago | 1

Answered
creating matrix using output elements
B=[1:1:576]'; mean(reshape(B,24,[]))

3 years ago | 0

| accepted

Answered
Is it possible to access/use sldd data within a stateflow without using a mask?
Once the SLDD is specified for the model, its data can be used by the whole model. What is the issue? In Stateflow, add a param...

3 years ago | 0

| accepted

Answered
Disable some or all the optimization for simulink simulation
I would suggest using blocks from Simulink Dashboard, e.g. Slider

3 years ago | 0

Answered
How do I print a legend using a character array and integer array?
a="current"; b={'archive'}; c='current'; sprintf('%s',a) sprintf('%s',b{1}) sprintf('%s',c)

3 years ago | 0

Answered
How to interact with model configuration parameters using script
vdp; get_param('vdp','ParameterOverflowMsg'); set_param('vdp','ParameterOverflowMsg','warning') web(fullfile(docroot, 'simu...

3 years ago | 0

| accepted

Answered
Not a 'Simulink.Signal' object
Select a signal line in your model, right click, select Properties, type in a name "SignalA", and check the check-box "Signal na...

3 years ago | 0

Load more