Community Profile

photo

Fangjun Jiang


Last seen: Today
3.107 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
Struct contents reference from a non-struct array object.
In your code, variable "filename" is a string. It does not have the structure field ".name". If your code looks like this, then...

alrededor de 14 horas ago | 1

Answered
Simulink Clock (time) reset?
Feed Constant value 1 to an integrator, the output is the time. Wrap the state of the Integrator to 5400 and 0.

alrededor de 18 horas ago | 0

Answered
Searching structure that has all caps field names with list that varies in case.
for iVar=1:numel(myVars) b_sp = b_struct.dArray.(upper(myVars{iVar})); end

1 día ago | 1

Answered
combine matrix in matlab
reshape([A;B],1,[])

1 día ago | 0

| accepted

Answered
Variables scope in MatLab function block
Use "Edit Data" in the MATLAB Function Editor to specify those base workspace variables as the parameters

3 días ago | 0

Answered
Naming Excel Sheet with xlswrite.
FileName=['Rule',num2str(x)] FileName=sprintf('Rule%d',x)

5 días ago | 1

| accepted

Answered
Why, when doing a for loop to form a column from an array, does it give me 0 values except for the last element?
most likely, change to Lo(I+3*(Q-1),1)=IncECEF(Q,I) And do you know this? A=magic(5); B=A' C=B(:)

6 días ago | 1

| accepted

Answered
How to plot two arrays which different time stamps and lengths in one plot?
%% A=[0.1 0.2 0.35 0.42]; B=[1 4 9 12]; C=[0.01 0.4 0.5 0.8 1 2 10]; D=[5 7 10 11 12 3 1]; [x,index]=sort([A,C]); y=[B,D...

6 días ago | 0

Answered
How to update new annotations or descriptions done in a library subsystem into the model where the library is used
To be clear, the annotation needs to be inside a subsystem block in the library. Then after you updated the annotation in the li...

7 días ago | 0

Answered
issues connecting my from workshop block to the PSS and SPS Converter block
In your diagram with error red line, on the top left, you need a Simulink to Physical System converter, not Physical System to S...

7 días ago | 0

| accepted

Answered
How to plot two different 3D graphics together?
The command "figure" creates a new figure. Use just one of them, and run "hold on".

8 días ago | 0

| accepted

Answered
How many Workspace's we have in MATLAB ?
Another common one is the function workspace, which is created when the function is entered and destroyed when the function is e...

8 días ago | 0

Answered
extracting values from a matrix or vector
b=a([2,5]), second and fifth element

8 días ago | 1

| accepted

Answered
If statements comparing two character strings with multiple inputs
variable 'str1' and 'str2' are supposed to take values from function input arguments when you call h20_props(50,"nu","SI"). But ...

8 días ago | 0

| accepted

Answered
How to get the string form of an anonymous function?
f = @(x) exp(-0.5*x); >> func2str(f) ans = '@(x)exp(-0.5*x)' Or, provide your string, use str2func()

9 días ago | 1

| accepted

Answered
How to determine the moment (time) at which the signal exceeded the set value in simulink?
Assume you build your model correctly, your signal varies as time goes. Compare your signal with the Constant value, its output ...

10 días ago | 0

Answered
How to change Simulink model line thikness
No. You can't. Simulink is a graphical modeling tool, but not a graph tool. Use something else such as Visio, or Shapes in MS Of...

14 días ago | 0

| accepted

Answered
Add one port to a Simulink block, from command line AND automaticaly keep the same distance between ports
I dealt with this problem before. There is no quick or automatic way but the following method worked for me to keep the existing...

14 días ago | 0

| accepted

Answered
Operator '==' is not supported for operands of type 'tf'
The reason: When you click "cancel" in the inputdlg(), your variable "tf" is not evaluated. When the second part of the code i...

15 días ago | 0

| accepted

Answered
why do i get the error 'undefined function or variable ' for simin from workspace
When you use "From Workspace" block, it expects the variable "simin" exists in the base workspace. Create that variable to elimi...

15 días ago | 0

| accepted

Answered
Transform a matrix in a special way
B=zeros(5); B(tril(true(5),-1))=A B=B'

15 días ago | 1

Answered
Coding philosophy : Is using global goto like using a global variable?
The simple answer is YES. What you see in C code is a code flow. The code is executed in sequence. What you see in Simulink is...

16 días ago | 0

| accepted

Answered
Is there a way to limit automatic Y or X axis scaling?
ylim('auto')

16 días ago | 0

Answered
Loading a fig file without opening
f=openfig('power.fig','invisible') a=get(f,'Children') ... close(f) clear f

17 días ago | 1

| accepted

Answered
Is there a way to define a new built-in function?
I would think NO but it does not really make any difference. If there is a way, you would have to modify some existing files in ...

17 días ago | 1

Answered
why do my output variables not update when I use the sim function
Here it goes again. Please see this. Mathworkers need to pay attention to this. This trap seems unreasonable. https://www.mathw...

20 días ago | 0

Answered
Sample Time and simOut Interaction
Usually it is because the fixed step size is too big for the model to simulate accurately. There are many solution to this. The...

22 días ago | 0

| accepted

Answered
Simulink menu bar is missing Matlab R2020b,academic use
If you are taking about the conventional "File", "Edit" menu, yes, they are long gone. It is mapped to "Simulink Toolstrip" Lo...

22 días ago | 0

| accepted

Answered
Create a value map from input signal in a Simulink block
1-D Lookup Table

22 días ago | 0

Answered
Why should a model not contain continuous states for production code generation?
On a model with continuous states, you can run a simulation with fixed step size using a solver, e.g. ode4. In fact, the simulat...

23 días ago | 0

Load more