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

oltre 3 anni fa | 0

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

oltre 3 anni fa | 0

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

oltre 3 anni fa | 1

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

oltre 3 anni fa | 0

| accettato

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

oltre 3 anni fa | 1

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

oltre 3 anni fa | 0

| accettato

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

oltre 3 anni fa | 0

| accettato

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

oltre 3 anni fa | 0

Risposto
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)

oltre 3 anni fa | 0

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

oltre 3 anni fa | 0

| accettato

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

oltre 3 anni fa | 0

Risposto
Getting error on opening Signal Builder block
Might be due to a corruptted file. If it is not critical to lose this particular block, then drag a new SignalBuilder block to a...

oltre 3 anni fa | 0

Risposto
How to assign initial values to closed loops in simulink
There are many blocks inside model A, B and C. Some of the blocks (e.g. an Integrator) have dialog parameter for initial value. ...

oltre 3 anni fa | 0

| accettato

Risposto
a serialized simulation in Simulink
This should be a relatively easy task. I think the best way is to implement it in the "StopFcn" callback of the model. Open th...

oltre 3 anni fa | 0

Risposto
Why can this expression be logically evaluated but not used in an if-statements?
"somehow it didn't throw an error in any of the cases (1, any number or no number)." The coding problem still exists. The err...

oltre 3 anni fa | 0

Risposto
Variation between data during simulation and that stored for use in second simulation
@Paul, I am determined to persuade you on this. Luckily, I was able to make an example quickly. See attached model in R2022b. ...

oltre 3 anni fa | 0

Risposto
Failed to evaluate mask initialization commands.
This is the first three lines of code in the initialization function of that "Image from File" block. The variable "ImageValue...

oltre 3 anni fa | 0

Risposto
How to set the 'Model name' in Model Reference via MATLAB command?
get_param(Block,'ModelName') get_param(Block,'ModelFile')

oltre 3 anni fa | 0

| accettato

Risposto
How to implement a look up table in simulink which can accept variable SIZE data as inputs
You must be using the "Lookup Table Dynanic" block for this. Accordig to its doc, it does not support 'variable-size signals". S...

oltre 3 anni fa | 2

Risposto
Custom Library Blocks get reset to default value every time the model is closed.
This is caused by improper mask or improper usage of a custom library block. The proper way is to specify the Constant block va...

oltre 3 anni fa | 0

Risposto
Variation between data during simulation and that stored for use in second simulation
I think I understand your question. I will use this diagram from https://en.wikipedia.org/wiki/Control_theory to explain. You...

oltre 3 anni fa | 0

Risposto
How to simulate a Simulink model through a .m file, that is executed by a GUI
It is a source workspace issue. Based on your code, Kennfeldabhaengigkeit.m is a script. "When I execute the m.file by itself"...

oltre 3 anni fa | 0

Risposto
Create an assembly matrix with ones placed from values in elemental matrix FEM
%% element = [1 2 4; 1 4 3]; N_Row=numel(element); N_Col=max(element(:)); Row_index=(1:N_Row)'; Col_index=element'; Col_in...

oltre 3 anni fa | 0

Risposto
Using Simulink block parameters in a Matlab function
If this value is something you type in at the dialog of the Simulink block, then Specify it as 'MyValue' at the dialog, then I...

oltre 3 anni fa | 0

Risposto
Algebraic Loop Caused by MATLAB Function Block. How to Resolve Without Time Delay?
If you suspect your MATLAB Function block or your MEX function caused the algebraic loop, consider setting this "Direct Feedthro...

oltre 3 anni fa | 1

| accettato

Risposto
Readtable (file not getting detected in the directory)
It is not robust to change the file name or create new files in the script and expect to access it right away in the script. in...

oltre 3 anni fa | 0

Risposto
Matrix index summation with repeated index
%% A = [1;2;3;4]; A_add = [1;2;3]; i = [1;2;1]; A=A+accumarray(i,A_add,size(A))

oltre 3 anni fa | 2

| accettato

Risposto
Save matrices (present within a cell) into a single matrix
C={rand(2,3), rand(4,3),rand(5,3)}; D=cell2mat(C')

oltre 3 anni fa | 0

| accettato

Risposto
Switch case structure, I needed to show all units in this excercise
use if-elseif, When you have logical comparison in the case statement, it results in true or false (1 or 0 in value). The resu...

oltre 3 anni fa | 0

Risposto
Error in using variable from MATLAB workspace to Simulink?
The error message has explained the problem. Maybe you are not familar with the usage. Double click the "From Workspace" block, ...

oltre 3 anni fa | 0

Carica altro