Community Profile

photo

Fangjun Jiang


2.160 total contributions since 2011

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

Contact

Fangjun Jiang's Badges

  • Revival Level 2
  • Ace
  • 12 Month Streak
  • Thankful Level 2
  • Knowledgeable Level 4
  • First Answer
  • Solver

View details...

Contributions in
View by

Answered
Recieving error Index exceeds the number of array elements (98) when attempting to useODE45?
t is 93x1 double, iM is 350. You try to access t(iM) which doe not exist. In other words, the index (iM, whose value is 350) exc...

etwa 18 Stunden ago | 0

Answered
Matlab stuck at Warning about Integers
With this, do you get it? >> a=rand(1,100); >> b=a(2:10); >> c=a(2:0.9:10); Warning: Integer operands are required for colon...

etwa 18 Stunden ago | 0

Answered
Could you please suggest me software or toolbox to edit MATLAB graph?
On your figure, click menu "Tools" and then check "Edit Plot".

etwa 18 Stunden ago | 0

| accepted

Answered
How do I change the save file format in excel using activeX in Matlab
Worked like a charm, in R2018b, MS Office 2016. file = 'Book1.xlsx'; sheet = 'Sheet1'; excel = actxserver('Excel.Applicatio...

etwa 19 Stunden ago | 0

Answered
How can I tell Simulink Embedded Coder to get its variable names from my signal names, not the source block names?
Select the signal line, right click, select "Properties" Provide the signal name (e.g. "c" ), check "Signal name must resolve t...

3 Tage ago | 0

Answered
How can I create a function to access substructure values?
Using dynamic field names, you don't even need the function. But if you do, it is quite simple. structName.(dynamicExpression) ...

6 Tage ago | 0

| accepted

Answered
Add table variable (addvars) with changing variable names
Seems no problem running the following code: clear; A=1; A1=2; A2=3; B=who('A*') T=table; addvars(T,B);

6 Tage ago | 0

Answered
who provided the fmu-matlab-setup scripts?
In your MATLAB, clik the "Add-ons" icon, then "Get Add-ons", search for "Tool-coupling".

6 Tage ago | 0

Answered
Copying a block and dynamically changing the name and sub block names.
The question is not very clear. You might be able to use gcb, gcbh, getfullname().

8 Tage ago | 0

| accepted

Answered
Can't run my simulation because of integrator. Error pop ups plz help!!!
You have the Clock as the input. Clock starts from zero when you start the simulation. Taking 1/u of zero results infinite.

9 Tage ago | 0

| accepted

Answered
How to put a char text to a existing panel
text() is to add text to an axes. use uicontrol() with "style" as "text".

28 Tage ago | 0

Answered
how can solve breakingpoint in simulink ?
The values in lookup_in must be monotonically increasing. Right now it is not. The third value is not regarded as larger than ...

etwa ein Monat ago | 0

| accepted

Answered
Error with s-function when simulink system is called within a matlab function
You need to specify the srcworkspace as 'Parent'.

etwa ein Monat ago | 0

Answered
How to use a variant sink depending on its input
I think the "Variant Sink" block is un-necessary. If you want to stop the simulation when any of the output goes nagative, then ...

etwa ein Monat ago | 0

| accepted

Answered
Open a file according to text box value.
Why don't you make the push button to call [filename, pathname]=uigetfile() to select the file? Then you can use the text box to...

etwa ein Monat ago | 0

Answered
Use spreadsheet time input for simulation timestep?
Theoritically you can't specify the exact simulation time as it is determined by other factors such as accuracy or tolerance. Th...

etwa ein Monat ago | 0

| accepted

Answered
How to get information on a Simulink.Signal data store?
Just like you did in the script, as long as you know the Simulink.Signal object name. To get the data type: DataStore.DataType ...

etwa ein Monat ago | 0

Answered
Does the Simulink State-Space block use the Matlab function "lsim"?
The Simulink State-Space block is one of the ways to specify a linear system. The simulation method (or solver) is specified in ...

etwa ein Monat ago | 1

Answered
there is something in the figure that I want to be deleted
Hover over the "yellow box", left click and then press the "Delete" key It is the "Data Cursor". You can see that icon on the t...

etwa ein Monat ago | 0

| accepted

Answered
How do I save a figure with the same file name as its title within a for loop?
saveas(gcf, Y{k}, 'fig')

etwa ein Monat ago | 0

| accepted

Answered
Retrieving only one field in a struct
value=getfield(X,'z')

etwa ein Monat ago | 0

| accepted

Answered
How to transpose a cell array converted into a character arrray?
a={'Green','Blue','Red'}; b=a'; aa=char(a); bb=char(b); isequal(aa,bb) Both aa and bb are 3x5 char array and they are ide...

etwa ein Monat ago | 0

Answered
Modify cell array contents?
mat2cell(A{1},1,[2 2 2])

etwa ein Monat ago | 0

Answered
Covert matrix to sub-matrices
reshape()

etwa ein Monat ago | 0

Answered
Can i use the same MATLAB function in Simulink multiple times?
I would assume so. Just create that function and save it in your MATLAB path and then call it in your MATLAB Function block. You...

etwa ein Monat ago | 0

| accepted

Answered
delay in Simulink Matlab function block
It looks like the Delay block in Simulink could meet your need.

etwa ein Monat ago | 0

Answered
How to produce and save in a variable a list of a folder's files?
a=dir('*.mat'); b={a.name}

etwa ein Monat ago | 0

| accepted

Answered
How to use "dir" command to get desired files in a folder?
dir('ign*.txt') and dir('ifs*.txt') should be able to separate them.

etwa ein Monat ago | 0

| accepted

Load more