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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 1

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 1

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 2

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

Beantwortet
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"...

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 1

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 2

| akzeptiert

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

Beantwortet
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, ...

mehr als 3 Jahre vor | 0

Mehr laden