Community Profile

photo

Fangjun Jiang


Last seen: Today
2,709 total contributions since 2011

What is a model?
Professional Interests: Model-Based Development

Contact

Fangjun Jiang's Badges

  • 36 Month Streak
  • Revival Level 3
  • First Review
  • Ace
  • Thankful Level 2
  • Knowledgeable Level 4
  • First Answer
  • Solver

View details...

Contributions in
View by

Answered
Using the first value of a variable during simulation in Simulink
If the triggered subsystem is truly ran only once, then you don't need to do anything. The output value of this block is "held"....

15 hours ago | 0

Answered
Error using matlab.ui.control.EditField/set.Value 'Value' must be a character vector or a string scalar.
The value for "app.BeginningEditField.Value" needs to be a character vector or string scalr. datetime() returns an object of the...

18 hours ago | 0

| accepted

Answered
How to retrieve the location of the points plotted ordered
If you run plot(x,y) instead of plot(x,y,'o'), you will see the correct curve. So your data is already "sorted" as you wanted. I...

21 hours ago | 1

Answered
Is there a way to programmatically display documentation pages for the methods of the Simulink.SimulationInput class rather than the page for class?
Use web() instead of doc() web(fullfile(docroot, 'simulink/slref/setpostsimfcn.html')) web(fullfile(docroot, 'simulink/slref/s...

1 day ago | 0

| accepted

Answered
Throw an error when more than one result is returned
use files=dir('*data.csv'); size(files)

1 day ago | 0

| accepted

Answered
Duty cycle Matlab funciton is Simulink. Error! -Undefined function or variable 'duty_cycle'. The first assignment to a local variable determines its class.
Two comments. Feed the "duty_cycle" to a "unit delay" block and then connect it to "past_duty". The first line inside your MAT...

1 day ago | 1

| accepted

Answered
Enable and Disable input/output subsystem's ports in Simulink
Variant Subsystem now supports various number of Inports and Outports of its variants. You can do it using the Variant Subsystem...

2 days ago | 0

Answered
If Action Block that create a stairstep signal in simulink
The "sample time" of the Constant block might have been set as "1" second.

2 days ago | 0

Answered
what this matlab syntax var1= input.var2 corresponds to ?
It is called struct. Follow the link to see the document and you can try youself. input.var2=2; input.var3=rand(3); MyVar=inp...

5 days ago | 0

Answered
Simulink Model Export as Video
If you have Windows 10, you can use the built-in capability with Windows Game Bar. Google "How to Capture Video Clips in Windows...

5 days ago | 0

Answered
Apply function with multiple input variables to table entry
function_handle might be what you need.

5 days ago | 0

Answered
In a single line, create a handle to the " +" function.
h=@plus; h(1,2)

6 days ago | 2

| accepted

Answered
How to choose a random coordinate (location like i,j) in a matrix
[m,n]=size(A); i=randi([1 m]); j=randi([1 n])

6 days ago | 0

| accepted

Answered
Stripping outputs from dir function
fileList = dir('*.png')

6 days ago | 0

| accepted

Answered
matlab space error problem
From "help strcat" For character array inputs, strcat removes trailing ASCII white-space characters: space, tab, verti...

6 days ago | 0

Answered
Sizing in subplot()
subplot(3,2,x) gives you 3 rows and 2 columns thus 6 subplots. x can be 1,2,...6

6 days ago | 0

| accepted

Answered
How to recall a figure which was generated by a name "fname = figure; figure(fname)" without saving it ?
When you run fpressure=figure, it creates the figure object handle fpressure. But after you clear the workspace, the figure obje...

6 days ago | 0

Answered
Removing NaN in all the columns from matrix A to produce matrix B
index=any(isnan(A)); B=A(:,~index)

6 days ago | 0

| accepted

Answered
Simulink filtering of a table
The straightforward way to do this is to use "n-D Lookup Table". You have a 5-D lookup table here. The first 5 columns are the l...

6 days ago | 0

Answered
How to store dynamically an array in a For iterator Simulink Subsystem
I know this might be a simple example behind your real need. But this is unnecessary. The for-loop can be implemented inside th...

6 days ago | 0

Answered
Issue with the variable after exiting for loop
Yes. before the loop abc_p=zeros(length (ring_vec), length (opcon_vec), length (rccorner_vec) ,....), matching the size in...

6 days ago | 0

| accepted

Answered
Set lower than 0.1 values to zero in tables that stored in a cell
In general, this is how you do it. Apply it to a table inside a cell should not be that difficult. a=rand(3,5); index=a<0.5; ...

6 days ago | 1

| accepted

Answered
system command pressing return
This trick has worked many times. Try it. Create a text file called KeyInput.txt, in which you hit return twice and save it. Ba...

6 days ago | 0

| accepted

Answered
ressistors with small random offset in SIMULINK
This "Variable Resistor" is not the right one to use. This "Variable Resistor" represents a physical variable resistor in the la...

7 days ago | 0

Answered
isempty is allways zero
zero and empty are different isempty([]) isempty(0) isempty('')

7 days ago | 0

| accepted

Answered
Eliminate certain entries of cell array
Would it possible to make it array? a=1:5; b=1:3; a=setdiff(a,b)

7 days ago | 0

Answered
Stop Simulink simulation when reached an oscillating steady state amplitude
If you have this toolbox and can use this block, maybe you can look at the rate of change of the magnitude. Sinusoidal Measurem...

7 days ago | 0

Answered
How to run a Simulink simulation using keyboard
Ctrl+T Keyboard and Mouse Actions for Simulink Modeling

7 days ago | 0

| accepted

Answered
Taking element of matrix from state space model of plant
Use the DeMux or BusSelector block

7 days ago | 0

| accepted

Load more