
Fangjun Jiang
What is a model? Professional Interests: Model-Based Development
Statistics
RANK
23
of 275,572
REPUTATION
9,286
CONTRIBUTIONS
13 Questions
3,643 Answers
ANSWER ACCEPTANCE
76.92%
VOTES RECEIVED
1,411
RANK
of 18,564
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
update a parameter in function block each timestep in simulink
Use the "Ramp" block to generate such a signal.
4 days ago | 0
Simulink, simout problem
The error is from the Simulink model itself. It can't determine the size of certain signals, most likely from the MATLAB Functio...
5 days ago | 0
Error evaluating 'InitFcn' callback of block_diagram 'SIMULINK_MODEL'. Callback string is 'MATLAB_MODEL' Caused by: Error using MATLAB_MODEL
Most likely, it is looking for a file named "MATLAB_MODEL_v20180919.m". Search for that file and check if the folder is in your ...
7 days ago | 0
Simulink: changing gain based on input
For this, it sounds like you just need a Gain block. Set the gain value to be 255/pi, when the input is 0, the output is 0. When...
7 days ago | 0
I want to correct this command please
The three equations form a non-linear ODE with three independent variables (x,y,z). Because they are coupled, you can't solve th...
10 days ago | 1
Why can I break Simulink library links by right-clicking in the model, but can't programmatically?
"Implicit" means Block resides in library block and is itself not a link to a library block. Suppose that A is a link to a subsy...
10 days ago | 0
Extracting values from a string - Matlab
You got string array (" ") and char array( ' ') mixed. See which data format fits you better. ind = "i 1 1" ind(1) ind2=char(...
10 days ago | 0
| accepted
How to log signal data from simulink to matlab with higher time interval to avoid high data storage?
Set the "Decimate data" to be 300. It means log every 300th data. It may not guarantee 0.3 second if using variable step size so...
11 days ago | 1
| accepted
Find maximum value in a column of each cell in a large set of cell array?
c={rand(10),rand(11),rand(12)}; N=5; cellfun(@(M) max(M(:,N)),c)
12 days ago | 0
| accepted
I would like to convert data of double type to single type before code generation in 2020A Simulink, without using Cast blocks on most functions.
See this example Validate a Single-Precision Model
13 days ago | 0
| accepted
Unable to use the variable from workspace which is sent to the MATLAB workspace using 'To workspace' block of the Simulink.
"Unable to read file 'IEEE_14_Bus_System_SM_FFR.mat'. No such file or directory." Make sure you have that .mat file. Use Comman...
13 days ago | 0
| accepted
Returning output signals from a Simulink block to Matlab
Access Data in a MATLAB Function During Simulation
14 days ago | 0
| accepted
Does anyone know how I can connect a matlab function block with memory block and a controlled current source?
See this How to Use Globals with the MATLAB Function Block
14 days ago | 0
Modify In/Output Port names with a MATLAB script
Something like this: [~,~,InPortNames]=xlsread('ExcelFileName'); % read Excel file to get PortNames as a cell array InPorts=fi...
17 days ago | 0
Dynamic Modeling of Wheel-track Composite Vehicle
Vehicle Dynamics Blockset has dual track model as well as wheel/tire dynamics. Not sure if this meets your need or whether you h...
18 days ago | 0
Is it possible to convert a referenced Configset to a regular Configset that is not referenced from an sldd?
copy, attach and setActive. similar to the example here? https://www.mathworks.com/help/simulink/slref/simulink.configsetref.ht...
19 days ago | 0
I noticed that some GoTo and From signals (input port no. 1) are not connected properly after the transfer (from one system to another system) of the model.
The number on top of the line indicates the size of the signal. "1" means a scalar. "2" means 1x2 or 2x1 vector. "?" means it ca...
19 days ago | 0
| accepted
How to achieve fan rpm with increasing step size?
The "step" increase you saw is probably determined by your lookup data and simulation step size. What you really need is proba...
20 days ago | 0
| accepted
Does anyone know which Simulink Block this is?
It looks like the "Fcn" block specified as "u(1)". It is used to pick out the first element. https://www.mathworks.com/help/re...
21 days ago | 1
| accepted
How to skip an empty value
You can use isempty(rp) to check, and then ignore as needed.
21 days ago | 0
| accepted
Unpack structure, only some fields
make use of fieldnames()? Avoid using the unpack() name. There is a built-in function with the same name. par.a=3.5; par.b=[4...
21 days ago | 0
Element wise (.*) in Simulink for two matrices with different dimensions
a=[1 2 3; 4 5 6]; b=[1; 0]; a.*b This is a change made in MATLAB in R2016b when implicit expansion is introduced. Prior to R2...
21 days ago | 0
| accepted
Is it possible to change a parameter in a Simulink model each time it is run via a for loop in a MATLAB script?
Yes. Run Simulations Programmatically sim()
21 days ago | 0
How do I fetch the linked Data Dictionaries to a Simulnik model with Commands?
There is an API. Start from here https://www.mathworks.com/help/simulink/ug/store-data-in-dictionary-programmatically.html
21 days ago | 0
| accepted
Delay certain subsystem in simulink
Make the subsystem a triggered subsystem. The Clock block gives you the simulation time. Compare its output to a Constant block,...
22 days ago | 0
Checkpoint to save the state of Simulink simulation at a specific sample time
Start from here https://www.mathworks.com/help/simulink/ug/model-operating-point-for-faster-simulation.html
23 days ago | 0
| accepted
How to activate the Edit-time checks under the Model advisor
on the Modeling tab, beside the "Model Advisor", click the little "down" triangle to see the "drop down list", then check or un-...
25 days ago | 0
Discrete Average on Simulink
See attachment. Use "window length" of "6" instead of "600" to illustrate. The build-in "Moving Average" block (it requires "DS...
25 days ago | 2
How to line plot the data in the Matlab?
plot(x,y,'.') is probably good enough.
25 days ago | 1
| accepted
How do I save a SINGLE value from the workspace?
You will have to assign that value to a temparary variable and then save it. a=rand(10,2); %save test.mat a(8,:) % this will c...
27 days ago | 0