Community Profile

photo

Fangjun Jiang


Last seen: Today
2 776 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
what is code to call a function ?
The function should be written like this and saved as tri_area.m function [area] = tri_area(b,h) area=1/2*(b)*(h); en...

environ 14 heures ago | 0

| accepted

Answered
Connecting a line from the first data point to the last data point
x=1:10; y=rand(size(x)); scatter(x,y); line(x([1 end]),y([1,end]))

environ 14 heures ago | 0

| accepted

Answered
simulink simulation data inspector : measurement of delta between data cursor
Right click, data cursors, turn on One and Two, you will see delta x

environ 17 heures ago | 0

Answered
Simulink Input Array with Trigger
A simplified example. Make two inputs, one is 5 and one is 10. Inside, Compare output to the first input (5) , if less, pass 5, ...

environ 20 heures ago | 0

Answered
Blocks are not shown on simulink page.
Drag and drop the block from library to the canvas of your Simulink model, then double click and set the parameters.

environ 20 heures ago | 0

Answered
How to reduce the execution time for Input/Output ports in Simulink?
An atomic subsystem will have to update its Inport and Outport at every simulation step while virtual subsystems don't need to d...

environ 20 heures ago | 0

Answered
Find reason for this warning msg: Variable 'hws' originally saved as a handle cannot be instantiated as an object and will be read in as a uint32.
My suspect is that there is a variable also called 'hws' in the .mat file. It was the handle of an object. For example, the hand...

environ 21 heures ago | 0

| accepted

Answered
On MATLab app designer, how can i get an editfield text as a variable?
EditFieldText='x(1)^3 + x(2)^2'; F=str2func(['@(x)',EditFieldText]); Then pass the function handle F to another function and u...

2 jours ago | 1

Answered
Set signal line label visibility programatically
A signal line in a Simulink model, once it is named, it will always show. There is no property to hide or show it. Unless, in y...

2 jours ago | 0

Answered
Can't append two large matrices due to limit in Matlab
Use Tall Arrays

2 jours ago | 1

Answered
Updating simulink block parameter as the simulation runs.
setting array value as [time1 value1;time2 value2; time3 value3....] works for signal, not for parameters. Use this approach ins...

4 jours ago | 0

| accepted

Answered
Unexpected error when plotting a bar chart
because your data is 4x2, h is an 1x2 array so you can't use h.YLabel. Check the value of h You have to use h(1).YLabel but the...

5 jours ago | 0

| accepted

Answered
Insert a function in Simulink
The Clock block gives you time t for simulation. The rest is to use multiplication, sum and Devide.

5 jours ago | 0

| accepted

Answered
One variable, two 'To Workspace' blocks simulink
"Res" is the variable created in the based workspace after simulation is done to log your simulation data You can't have two "T...

9 jours ago | 0

Answered
Matlab to excel and back! Q about using ActiveX
See if you have this file in your MATLAB release edit ChangeRowHeightInRangeOfSpreadsheetCellsExample.m

9 jours ago | 0

Answered
Is there a function that will test if the input is char OR string OR cellstr?
You've made that function. If you look at the "See also" section of "help iscellstr", you don't see any other related functions....

9 jours ago | 0

Answered
obtain answer in brackets
mat2str(magic(3))

9 jours ago | 1

| accepted

Answered
check referenced models do exist
You can do this. MdlRef=find_system(Model,'BlockType','ModelReference'); for k=1:length(MdlRef) SubModel=get_param(MdlRef{k},...

9 jours ago | 0

| accepted

Answered
Accessing Simulink Model using M script
Something like this: Model='MyModel'; open_system(Model); Sys=find_system(Model,'BlockType','SubSystem'); for k=1:length(Sys...

9 jours ago | 0

Answered
how to add singal and its attributes( data type, min, max values to data dictionary programatically?
What you can do is to create the Simulink.Parameter as a temparary object and assign all its properties and then addEntry(). A ...

10 jours ago | 0

| accepted

Answered
all test harness signals are initialized to the wrong values (ZEROS)
Find the source of the signal in the model (the output of a Gain block or could be a root level Inport block, where the signal i...

10 jours ago | 0

Answered
Change Simulink.Parameter ExportedGlobal from inside Simulink model
The reason that the external code can modify that parameter is because You made it ExportedGlobal It is C code The C code bas...

10 jours ago | 0

| accepted

Answered
Simulink: minimum values in vector segments
Use a MATLAB Function block and code similar like this: y=min(reshape(1:20,4,5)) work out the warnings and errors regarding var...

11 jours ago | 1

Answered
Observe the output in Matlab workspace
Assume "y" is "the output". Let's do it properly. In your Simulink model, double click the signal line out of the dy/dt Integrat...

11 jours ago | 0

Answered
Optimize Rapid Accelerator and avoid rebuilding
Avoid Scope block. Try Simulink Data Inspector web(fullfile(docroot, 'simulink/slref/simulationdatainspector.html'))

12 jours ago | 0

Answered
Error: Unable to resolve the name workbooks.Open.
After excel = actxserver(), you have not defined "workbooks". Need this? workbooks= excel.Workbooks;

12 jours ago | 0

| accepted

Answered
Changing image in an algebraic loop
A better way in this case is to use persistent variable. doc persistent But a loop with memory or delay block should also work....

12 jours ago | 0

Answered
Remove default block names from auto generated Code using embedded coder
If you want a particular variable name for a signal line in the model, double click the signal line, give it a name "MySignal", ...

14 jours ago | 0

| accepted

Answered
couldnt able to use switch statement with string
material=lower(material); without the single quote.

15 jours ago | 0

| accepted

Answered
Issue with Lookup Table Code Generation?
Column-Major Layout to Row-Major Layout Conversion of Models with Lookup Table Blocks web(fullfile(docroot, 'ecoder/ug/column-m...

15 jours ago | 0

| accepted

Load more