
Fangjun Jiang
What is a model? Professional Interests: Model-Based Development
Statistics
RANK
23
of 272,948
REPUTATION
9,110
CONTRIBUTIONS
13 Questions
3,573 Answers
ANSWER ACCEPTANCE
76.92%
VOTES RECEIVED
1,389
RANK
of 18,433
REPUTATION
N/A
AVERAGE RATING
0.00
CONTRIBUTIONS
0 Files
DOWNLOADS
0
ALL TIME DOWNLOADS
0
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Content Feed
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...
21 hours ago | 0
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...
24 hours ago | 0
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)
2 days ago | 0
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...
2 days ago | 0
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
2 days ago | 0
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 days ago | 0
| accepted
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 days ago | 0
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 days ago | 0
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...
4 days ago | 0
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 ...
7 days ago | 0
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...
8 days ago | 1
creating matrix using output elements
B=[1:1:576]'; mean(reshape(B,24,[]))
8 days ago | 0
| accepted
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...
8 days ago | 0
| accepted
Disable some or all the optimization for simulink simulation
I would suggest using blocks from Simulink Dashboard, e.g. Slider
8 days ago | 0
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)
9 days ago | 0
How to interact with model configuration parameters using script
vdp; get_param('vdp','ParameterOverflowMsg'); set_param('vdp','ParameterOverflowMsg','warning') web(fullfile(docroot, 'simu...
9 days ago | 0
| accepted
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...
9 days ago | 0
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...
9 days ago | 0
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. ...
10 days ago | 0
| accepted
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...
12 days ago | 0
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...
14 days ago | 0
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. ...
14 days ago | 0
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...
15 days ago | 0
How to set the 'Model name' in Model Reference via MATLAB command?
get_param(Block,'ModelName') get_param(Block,'ModelFile')
15 days ago | 0
| accepted
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...
15 days ago | 1
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...
16 days ago | 0
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...
16 days ago | 0
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"...
16 days ago | 0
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...
21 days ago | 0
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...
21 days ago | 0