Community Profile

photo

Fangjun Jiang


2.262 total contributions since 2011

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

Contact

Fangjun Jiang's Badges

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

View details...

Contributions in
View by

Answered
concatenating even and odd rows
A=rand(10,16); B=[A(1:2:end,:),A(2:2:end,:)]

5 giorni ago | 0

| accepted

Answered
Does Simulink blocks data type affect simulation time?
Probably no effect. And probably causes more time since you need to resolve data type conflicts and add data type conversion. I...

5 giorni ago | 0

Answered
How to include a variable in "fopen" file name in a For loop?
for k=1:5 FileName=sprintf('output_matlab_%d',k) end

5 giorni ago | 1

| accepted

Answered
How to use boolean to control switch with fixed point data.
You set the criteria of the Switch block as u2>=1, which implies that u2 is double data type. Through back propagation, it requi...

7 giorni ago | 0

Answered
How can multiple data dictionaries be associated with a model?
Once you added the first one, then open it in Model Explorer. You can add "Referenced Dictionaries".

7 giorni ago | 0

Answered
Three step wind pattern
Use three step inputs and add them together Use FromWorkspace block, specify time and value pairs Use Signal Builder block

12 giorni ago | 0

Answered
Importing data to simulink
Assume your Mx2 matrix is in base workspace and named as "B", use a FromWorkspace block and specify the value as "B". Note that ...

13 giorni ago | 0

Answered
num2str usage from MATLAB 5.6 to MATLAB 2014b
Not sure what happened, but all you need to do is to insert a whitespace or comma in front of all the num2str() calls. out =['n...

17 giorni ago | 0

Answered
Moving graphs from Simulink to Word
Go to MATLAB Preferences, Figure Copy Template to set the preferences. Use enhanced metafile to get the highest resolution.

17 giorni ago | 0

Answered
Can you "black box" a library?
Instead of library, you can provide a Protected Models for Model Reference

17 giorni ago | 0

| accepted

Answered
can't plot using user-defined function block.
Keep in mind that this MATLAB Function block is executed at every simulation step you run. Your funciton ouputs 201 values at ev...

24 giorni ago | 1

| accepted

Answered
Why does SIMULINK give me extra dimension?
That 51 means you have ran the simulation for 50 steps. It records your 6 values at time 0,1,... 50 steps.

24 giorni ago | 0

Answered
How to create ramp?
Use "Signal Builder" block. You can move the data point to achieve your graph.

26 giorni ago | 0

Answered
is it possible to declare customized units for Simulink Parameters?
You can put in any string for unit in this dialog (ignore the dropdown selection list). It will be just a text for one of the pr...

27 giorni ago | 0

| accepted

Answered
how can choose the solver parametres?
If you hover your mouse cursor over the text (for example, Fixed-step size), a popup text give you a brief description. You can ...

28 giorni ago | 1

| accepted

Answered
I want to generate pulses as described in the image
Use the "Repeating Sequence" block to generate the saw tooth wave, then compare it to constant 0.5 and -0.5.

28 giorni ago | 0

Answered
loaded file is pathname
Increase the width of the "Value" column, you will see the full string. Or type "XMLFile" in Command Window.

28 giorni ago | 0

Answered
For Loop Iterator Not working as expected.
You need to understand the difference between simulation steps and iteration steps. It looked like you ran simulation for 20 sec...

circa un mese ago | 0

Answered
For Iterator Block Not present in Library , Any Idea ?
I looked and my library is the same as yours. The "For Iterator" block can't be used alone anyway so I don't think this is an is...

circa un mese ago | 0

| accepted

Answered
changing diagional values with different values
n=5; a=magic(n); b=a; index=sub2ind(size(a),1:n,1:n); b(index)=0; s=sum(b,2); b(index)=s;

circa un mese ago | 0

Answered
Loading and saving huge matrices in Simulink
Can't use .mat file? Try Simulink Data Dictionary.

circa un mese ago | 0

Answered
Sum variable size chunks in array
B=mat2cell(A,size(A,1),v); C=cellfun(@(x) sum(x(:)),B) or should be this B=mat2cell(A,size(A,1),v); C=cell2mat(cellfun(@(x) ...

circa un mese ago | 0

Answered
Run simulink until trigger
Use the "Stop Simulation" block in Simulink->Sinks

circa un mese ago | 0

| accepted

Answered
replace with nans after condition
A(A<0.15*A_max)=nan

circa un mese ago | 0

Answered
Coder - Create constant for specifying array size
Please refer to the document Code Generation for Variable-Size Arrays web(fullfile(docroot, 'simulink/ug/what-is-variable-size...

circa un mese ago | 0

Answered
Why can't i create graph with two matrices in SIMULINK?
Not sure what is the block type for the bottom one, FromWorkspace? Anyway, you need to understand the difference between MATLAB...

circa un mese ago | 1

| accepted

Answered
How can i edit an object of the type SimulationOutput?
Just double click it in Workspace editor or run "open varname" for API web(fullfile(docroot, 'simulink/slref/simulink.simulat...

circa un mese ago | 0

Answered
How to import column data from multiple Excel files with different number of rows?
Since each file contains different number of rows, you will need to use cell array for this. Change inside the loop to Time{K}=...

circa un mese ago | 2

| accepted

Answered
How can i test interface signals between subsystems?
If the signal goes directly from Subsystem1 to Subsystem2, then by definition their values are the same. Why would you still wan...

circa un mese ago | 0

Answered
splitting matrix into separate elements
Drop a Constant block, specify the value as [1;2;3], connect it to a Demux block, specify the "Number of outputs" as 3. Connect ...

circa un mese ago | 1

Load more