Community Profile

photo

Fangjun Jiang


Last seen: Today
2,955 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
Use Simulation Time of Simulink in Matlab function when threshold is exceeded
Use Step block to specify time and value. This is your threshhold. Use Comparator block to compare your incoming signal with t...

30 minutes ago | 0

Answered
Round a signal in simulink?
'simulink/Discontinuities/Quantizer'

43 minutes ago | 0

Answered
Rate Transition in If-action Subsystems
Let's say your whole model is executed at every 0.1s. At every 0.1 second, the condition is checked and the "If-action" subsyste...

1 hour ago | 0

Answered
How to get Simulation Status correctly?
Use set_param('vdp','SimulationCommand','continue') to change the simulation status, other options are 'start', 'pause','stop'. ...

3 hours ago | 0

Answered
Plot not showing line fully
Might it contain nan? plot([1:3,nan,nan,4:6])

3 hours ago | 0

Answered
Problem with conection port/ input port in subsystem
Most likely, you need this "Physical Signal to Simulink Signal Convert" block. https://www.mathworks.com/help/releases/R2020b/p...

21 hours ago | 0

Answered
Dot indexing is not supported for variables of this type when trying to write value into static text box
set(hObject, 'String', num2str(value)) see this comment ? % hObject handle to edit1 (see GCBO) % handles empty - ha...

4 days ago | 0

Answered
Lookup value in one array based on interpolated point in another?
interp1() in MATLAB "1-D Lookup Table" block in Simulink.

4 days ago | 0

| accepted

Answered
How can two people work at the same time at a code
This is a typical source control issue. Take a look at GitHub.com. There is free version available. MATLAB supports Git.

4 days ago | 1

Answered
how to get keyboard in matlab
use function input()?

6 days ago | 0

Answered
simulink models with iPad
Would MATLAB Online be a solution?

6 days ago | 0

Answered
How to find each model uses given block?
You will need to go through a loop, open or load each model, find if particular block exists and then close the model. open_sys...

6 days ago | 0

Answered
How to divide an array into sperate vectors.
use reshape() to transform it to 4x250 or 250x4 then loop through row or column

7 days ago | 0

| accepted

Answered
simulink not updating scope
It might be a visual misconception, e.g. the simulation runs too fast for eyes to catch. Change the simulation stop time to be '...

8 days ago | 0

Answered
Simulink-Blockmask: How to add a button and assign a callback by m-file script?
To get mask parameters get_param(gcb,'MaskNames'), or 'MaskVariables','MaskPropertyNameString',... To do mask programmatically...

8 days ago | 0

Answered
'Decimation' Error in Simulink
Follow the link of the error message to find the involved block. You must have provied an incorrect number for the "Decimation" ...

8 days ago | 0

| accepted

Answered
Referenced Data Dictionaries and Hierarchical Models
You are over-thinking and making it overly complicated. There is no hierarchy for parameters. Simply create Kp1, Kp2, Kp3 or bet...

11 days ago | 0

| accepted

Answered
trying to open .fig file but an error shows
Some times, or many times, when you save a .fig file, there is also a .mat file saved for it. You need both files to be able to ...

11 days ago | 0

Answered
What are the obsessions you saw in MATLAB Answers or in MATLAB programming?
I will start with the popular ones No-looper: don't want to use for-loop One-liner: Must get the result in one line of code G...

11 days ago | 0

Question


What are the obsessions you saw in MATLAB Answers or in MATLAB programming?
Those obsessions that seem to persist but not necessarly good.

11 days ago | 3 answers | 0

3

answers

Answered
how to superscript in subtitle of a figure?
h=suptitle('CH5NO2^+')

11 days ago | 0

| accepted

Answered
Rounding set of number to closest number in array
interp1(yaxis,yaxis,x_n,'nearest')

11 days ago | 1

Answered
how to add single quotes ' ' in a string?
a='this include ''single quote'' and others.' b="using 'string' is better"

12 days ago | 0

Answered
How to make alternating signs on a matrix?
There are many ways. This is probably the easiest. E(1:2:end) is the 1, 3, 5,... th element of the matrix E(2:2:end) is the 2,...

13 days ago | 0

Answered
Merging two .sldd without duplicates
using API, you can go through all the entries in the two .sldd files, find duplicate ones and remove them from one of the SLDD ...

13 days ago | 0

Answered
Simulink vector to bit a second
If you want to feed a vector like [1, 0, 1 ... 0], in which every value is either 0 or 1, the total length is 1023, at a rate of...

15 days ago | 0

| accepted

Answered
How to overlap plots from different scripts?
In the first script or function, do f1=figure and then plot; return f1 if it is a function. In the second script or function, d...

15 days ago | 0

Answered
Simulink from workspace block
When the data specified in the FromWorkspace block is an array, the first column is the time, so your data means that at time=1 ...

15 days ago | 1

| accepted

Answered
hello friends, when i done a modelling in simulink error "the "FixedStepDiscrete" solver cannot be used to simulate block diagram,because it contains continuous states" is occuring.... even i tried all the solver types but nothing worked.. help me..
You mean "all the solver" that are available?? Choose "ode45" or "auto". What is the error message if theare are any? It can't ...

15 days ago | 0

| accepted

Solved


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

20 days ago

Load more