Community Profile

photo

Fangjun Jiang


Last seen: Today 2011 以来アクティブ

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

Statistics

All
  • 36 Month Streak
  • Revival Level 3
  • First Review
  • Ace
  • Thankful Level 3
  • Knowledgeable Level 5
  • First Answer
  • Solver

バッジを表示

Content Feed

表示方法

回答済み
How can i pass a string from simulink mask to matlab function block
With R2018a (with the String Constant block) or later, you can do this, with a little extra effort. Add a 'String Constnat' blo...

約3時間 前 | 0

回答済み
Is there a way to pass the name of an input signal to a matlab function block in simulink?
Not through passing but you can get it through get_param(). Note that some functions are not supported for code generation. fun...

約8時間 前 | 0

回答済み
Simulink does not support 'Array' format for logging multiport data. Change the logging format of the Scope to 'Dataset', 'Structure', or 'Structure with time'.
See document web(fullfile(docroot, 'simulink/gui/format.html')) To use Array format, all logged states and outputs must be: ...

1日 前 | 0

回答済み
Implicit scalar expansion doesn't work in MATLAB function block.
Good news. It seems it is available in R2021b, but not in R2021a. Check https://www.mathworks.com/help/releases/R2021b/coder/u...

1日 前 | 0

回答済み
Use #define values from a Matlab function
You might need to add the C header file and source C code file to the model, Ctrl+E, Simulation Target, Follow the example in...

1日 前 | 0

回答済み
Trying to read a new licence into LMTool on Linux
Name primary license file as license.dat, name secondary license file as xxx.lic. Put both in matlabroot\licenses folder and the...

4日 前 | 0

回答済み
Difference between successive rows in a column
a=magic(6); b=diff(a(:,4)) a(2:end,end+1)=b

4日 前 | 0

回答済み
How to make this string a = '(0 0 0)' into a double b = [0 0 0]?
a = '(12 2.8 1.22)'; b=sscanf(a,'(%f %f %f)') b=transpose(sscanf(a,'(%f %f %f)'))

4日 前 | 0

回答済み
Sharing Custom Simulink Library via Toolbox
https://www.mathworks.com/help/matlab/matlab_prog/create-and-share-custom-matlab-toolboxes.html https://www.mathworks.com/help/...

4日 前 | 0

回答済み
Compare all the signals from 2 data inspector or .mat files
This is exactly what Simulink Data Inspector does. Follow the documentation and examples. https://www.mathworks.com/help/simul...

4日 前 | 0

回答済み
How to select a subsystem for convertToModelReference with an unknown subsystem name?
Since you have only one Subsystem block in the root level of the model, this will return this Subsystem. find_system(args,'Sear...

4日 前 | 1

| 採用済み

回答済み
Disable TransportDelay warning when time delay is set to 0
I understand the convenience of your using the TransportDelay block. When there is no delay, simply set the delay to be zero. Bu...

5日 前 | 0

回答済み
fprintf use with error
use single quote mark, not double quote mark a=1.2; fid=1 fprintf(fid, 'this is my number %f', a)

5日 前 | 0

回答済み
Simulink "globals" not working as expected
"global" data store is not meant for saving data between different simulation runs. Refer to this: web(fullfile(docroot, 'sim...

8日 前 | 0

| 採用済み

回答済み
Masked Subsystem: How to pass a double vector to a constant?
I don't know why this old question suddenly appears at the top. I believe the answer to this question is a trick. Use mat2str()...

8日 前 | 0

回答済み
The Problem Of Multiple Gotos?
This is a bad practice or even incorrectr practice to put a "Goto" block inside a library component, which you know will be used...

8日 前 | 0

回答済み
using a stateflow as a subsystem reference with some parameters to be editted after instantiation
Create your Stateflow chart and create parameter variables, add a mask to the Stateflow chart to bring all those parameter varia...

11日 前 | 0

| 採用済み

回答済み
How do I manage the Model configuration parameters when using variant with several system targets ?
You can have multiple model configuration sets saved with the model and switch them. It can be done manully or through API. htt...

13日 前 | 0

| 採用済み

回答済み
how to find index from matrix in another matrix?
%C is the logical index matrix. A=zeros(2,3,4); A(:,:,4)=4; A(:,3,4)=5; C=or(A==4,A==5) %To use it to select correspondin...

14日 前 | 0

回答済み
How to open a Simulink example using command
Most likely, you don't have the toolbox installed. Or, if installed, the path is not correctly set. Try these two commands in yo...

18日 前 | 0

回答済み
know the number of open unsaved(dirty) simulink files
bd=find_system('type','block_diagram','dirty','on')

22日 前 | 0

| 採用済み

回答済み
Definition and Control of Variables via the Simulink Dashboard
Not sure if you are aware of the differences. The blocks in Dashboard are used to control parameter values and display signal va...

25日 前 | 0

回答済み
syntax cellstr Error when using double as input argument
There is no point comparing two functions (with the same name) in two software and demanding one behaves the same way as the oth...

26日 前 | 1

回答済み
Finding settling time of a response.
stepinfo() lsiminfo()

26日 前 | 0

回答済み
Option to confirm tab auto-completion with 'Enter'
MATLAB Preferences, Editor/Debugger, Automatic Completions Command Window, Automatic Completions

26日 前 | 0

回答済み
Real time, Matlab, SpeedGoat, Simulink, read write data, Solution?
To store runtime data like "A" in your example, use "Data Store Memory" block in your Simulink model. Use "Data Store Read" and ...

26日 前 | 1

| 採用済み

回答済み
matlab R2020b randperm fuction is not random
Duh! You store the result in "order" and display it again. Of course they are the same! order = randperm(10) disp(order) orde...

26日 前 | 1

| 採用済み

回答済み
Identifying data in plot from legend.
This might help. On the figure window, click the "Link/Unlink plot" button, or select menu "Tools", check "Link". On the pop-up...

27日 前 | 0

回答済み
how to set port using loop indexing instead of defining every node pair explicitly.
setports(ckt,port_node(1,:),port_node(2,:),port_node(3,:)) or b=mat2cell(port_node,ones(size(port_node,1),1),size(port_node,2)...

27日 前 | 0

| 採用済み

回答済み
Finding the mean of every 24 elements of 3rd dimension of a 3d array
Something like this. Try simple example to make sure the dimension, row, column are right. a=ones(2,3,10); b=mean(reshape(a,2,...

27日 前 | 0

| 採用済み

もっと読み込む