Community Profile

photo

Fangjun Jiang


Last seen: Today
3 155 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
How to achieve identical timing of two side by side annotations
What you can do is this. I think it can improve the timing. h1=annotation(..., 'visible','off'): h2=annotation(..., 'visible',...

2 jours ago | 0

Answered
Architectural documentation of simulink model - UML
System Composer is supposed to do this. It uses SysML.

2 jours ago | 0

Answered
How can I strip duplicates?
If you want remove duplicates only based on values in the first column Do not want the returned values be sorted then you nee...

2 jours ago | 0

Answered
How can I swap two elements in each row of a matrix without loops?
This is lengthy but does the job. %% flag=logical([0 0 1 1]); % pick two elements in each row p=perms(flag); % all the possib...

3 jours ago | 0

Answered
Mysterious tangent line on my plots
Your code has problem. If you have "clear all" at the begining to clear the variables in the memory, then your code has error. ...

3 jours ago | 0

| accepted

Answered
Rearrangement of vector elements
something like this? a=(1:95)' b=reshape(a,19,[]) c=b(1:11,:) d=c(:)

3 jours ago | 1

Answered
How to create a string array with long strings that continue to a new line?
s=["aa"+ ... "aa", "bb"+ ... "bb"] s = 1×2 string array "aaaa" "bbbb"

3 jours ago | 2

Answered
where is function block parameters:fcn that expression ex) sin(u(1))+cos(u(1))
I heard it was being phased out. I don't remember which version. You probably can search it in release note. It will be not ava...

4 jours ago | 0

Answered
How to make state-space model for an array input in Simulink?
You should not duplicate the State Space block. The size of A, B, C and D should all match properly to the number of states X, t...

6 jours ago | 0

Answered
Why Matlab and Simulink have different Plot for the same modulo function?
The step size is more important than solver in this case. Reducing the step size to be 1 or 0.5 and making it fixed would resolv...

10 jours ago | 1

| accepted

Answered
Why do i receive this error when lunching simulink ?
The \slprj folder can't be created under "C:\Program Files\MATLAB". Move your models and work in other folder such as \MyDocumen...

12 jours ago | 0

Answered
How to put variable name in Y-limits of a scope in Simulink programmatically from Matlab
Seems true but also, it works this way. >> YY=5 YY = 5 >> set(gcbh,'ActiveDisplayYMaximum','YY') >> get(gcbh,'ActiveDi...

12 jours ago | 0

| accepted

Answered
zpk function is missing
I believe zpk() requires Control System Toolbox. Check to see if you have it ver control

13 jours ago | 0

Answered
storing matrix elements in a single variable as string
Use for-loop if want to split A = [3 25 100 5 20 100]; >> B=sprintf("%d#%d@%d\n",A(:)) B = "3#25@100 5#20@100 ...

13 jours ago | 0

| accepted

Answered
finding the index of an array in cell array
arr ={[1,2,3],[4,45,6]}; >> index=find(cellfun(@(x) all(x==[1 2 3]),arr)) index = 1

13 jours ago | 0

| accepted

Answered
How to add the "Plottools" icon to plot control ribbon.
On the figure, click menu "View", check "Figure toolbar" or "Plot Edit Toolbar" or others.

16 jours ago | 0

| accepted

Answered
How do i fix return error in matlab?
This is a warning, not an error. If the code "return" here (which means exiting the function), the varialbe "rho" may never be ...

16 jours ago | 0

Answered
Convert from R2019b to R2019a
Open the model, click menu "File" then "Export model to"

16 jours ago | 0

Answered
Unable to use curly braces to index into cell
Where is your variable "cell" defined? cell() is a function. Use some other name.

16 jours ago | 0

Answered
Open figure in new window instead of next to editor using figure object
%% close all; f=figure('Name', 'FFT-Test','position',[150,0,1000,650]) f1=subplot(4,1,1,'Parent',f) plot(1:10) f4=subpl...

17 jours ago | 0

| accepted

Answered
Continue, step in , step out are disabled after error in program
run "dbstop if error" and then run your porgram and debug run "dbclear if error" to go back to normal

18 jours ago | 0

| accepted

Answered
Summing two binary vectors
%% a = [1 0 1]; b = [1 1 0]; s=dec2bin(bin2dec(num2str(a))+bin2dec(num2str(b))) out=str2num(s(:)) out = 1 0...

18 jours ago | 0

| accepted

Answered
where to place the "From" block in this simulink model
These are warnings not errors. These warnings are usually fine. It means thoese two connections are created but not used. Take...

18 jours ago | 1

Answered
How to get selector block configured as seen below?
start from default, set "Inpurt port size" to be 2, set "Index" to be 2

19 jours ago | 0

Answered
Converting string to a double
Are you sure? >> format long >> a=str2double('1.7356922617E-3') a = 0.001735692261700

19 jours ago | 1

Answered
Eliminating the rows from a matrix
index=A(:,end)<4; A(index,:)=[]

19 jours ago | 0

| accepted

Answered
Save disp to a text file
help diary

19 jours ago | 0

Answered
Dimensions being inconsistent even though nothing has changed the output
Double click the Outport block "Height" to check its properties. The question mark is referencing an issue there.

23 jours ago | 0

Answered
Simulink does not start
try to run "slLibraryBrowser". It seems there are problems with the Simulink template files.

23 jours ago | 0

Answered
if expression it is not triggered
Give some tolerance. They are not exactly the same in the world of floating-point data. >> 1-1/3==2/3 ans = logical ...

24 jours ago | 1

Load more