Community Profile

photo

Fangjun Jiang


Last seen: Today Aktiv seit 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

Abzeichen anzeigen

Content Feed

Anzeigen nach

Beantwortet
Run a script on all files in a folder/subfolders
I think the approach here can be used. https://www.mathworks.com/matlabcentral/answers/1934245-want-to-iterate-over-subfolders-...

etwa 6 Stunden vor | 0

Beantwortet
Load data from *.mat file with mask
For string parameters like folder and file name, you might not be able to pass it from the mask to the inside block parameter. I...

etwa 6 Stunden vor | 0

Beantwortet
Convert osm data to xodr
Mathworks' RoadRunner can do it but if you don't have a license, try the open-source SUMO with its netconvert. https://sumo.dlr...

3 Tage vor | 0

Beantwortet
Parameters of FunctionCall block in Simulink
Click "Help" to bring up the document. It is there. get_param(gcb,'FunctionPrototype') 'InputArgumentSpecifications' 'OutputA...

3 Tage vor | 0

Beantwortet
Want to iterate over subfolders within folder
Files=dir('**/*.xlsx') will give you a list of all the .xlsx files in the folder and sub-folder. Observe Files(1), Files(2), .....

4 Tage vor | 0

| akzeptiert

Beantwortet
Is it possible to control where the ADC samples within a period? MATLAB Simulink C2000 F28379D
Not too many people noticed this. In the case of a discrete sample time, the vector is [Ts, To] where Ts is the sampling perio...

4 Tage vor | 0

Beantwortet
Why can't the index variable of a for loop be stored in a structure or other array?
There is no mention of any requirement on the name of the index varialbe, here in the document for "for", https://www.mathwork...

4 Tage vor | 0

Beantwortet
How to obtain a vector (A) of 11 rows (output MATLAB Function block), from a vector (B) of 501 rows (input to the MATLAB Function block)?.
The straight solution is to use below. function y=f(A,B) temp=sqrt((A).^2+(B).^2); y=temp(1:49:450); Simulink is strict on k...

5 Tage vor | 0

Beantwortet
Using Try/For loop to allocate correct serial port number
See help document for "break" and "continue" for k=1:100 port=sprintf('COM%d',k); try ND280 = serialport(por...

6 Tage vor | 0

| akzeptiert

Beantwortet
How to fetch the documentation content of a Doc block?
See this Answer. https://www.mathworks.com/matlabcentral/answers/521695-my-docblock-data-doesn-t-update-programmatically

6 Tage vor | 0

Beantwortet
update a parameter in function block each timestep in simulink
Use the "Ramp" block to generate such a signal.

11 Tage vor | 0

Beantwortet
Simulink, simout problem
The error is from the Simulink model itself. It can't determine the size of certain signals, most likely from the MATLAB Functio...

12 Tage vor | 0

Beantwortet
Error evaluating 'InitFcn' callback of block_diagram 'SIMULINK_MODEL'. Callback string is 'MATLAB_MODEL' Caused by: Error using MATLAB_MODEL
Most likely, it is looking for a file named "MATLAB_MODEL_v20180919.m". Search for that file and check if the folder is in your ...

14 Tage vor | 0

Beantwortet
Simulink: changing gain based on input
For this, it sounds like you just need a Gain block. Set the gain value to be 255/pi, when the input is 0, the output is 0. When...

14 Tage vor | 0

Beantwortet
I want to correct this command please
The three equations form a non-linear ODE with three independent variables (x,y,z). Because they are coupled, you can't solve th...

17 Tage vor | 1

Beantwortet
Why can I break Simulink library links by right-clicking in the model, but can't programmatically?
"Implicit" means Block resides in library block and is itself not a link to a library block. Suppose that A is a link to a subsy...

18 Tage vor | 0

Beantwortet
Extracting values from a string - Matlab
You got string array (" ") and char array( ' ') mixed. See which data format fits you better. ind = "i 1 1" ind(1) ind2=char(...

18 Tage vor | 0

| akzeptiert

Beantwortet
How to log signal data from simulink to matlab with higher time interval to avoid high data storage?
Set the "Decimate data" to be 300. It means log every 300th data. It may not guarantee 0.3 second if using variable step size so...

18 Tage vor | 1

| akzeptiert

Beantwortet
Find maximum value in a column of each cell in a large set of cell array?
c={rand(10),rand(11),rand(12)}; N=5; cellfun(@(M) max(M(:,N)),c)

20 Tage vor | 0

| akzeptiert

Beantwortet
Unable to use the variable from workspace which is sent to the MATLAB workspace using 'To workspace' block of the Simulink.
"Unable to read file 'IEEE_14_Bus_System_SM_FFR.mat'. No such file or directory." Make sure you have that .mat file. Use Comman...

21 Tage vor | 0

| akzeptiert

Beantwortet
Returning output signals from a Simulink block to Matlab
Access Data in a MATLAB Function During Simulation

21 Tage vor | 0

| akzeptiert

Beantwortet
Does anyone know how I can connect a matlab function block with memory block and a controlled current source?
See this How to Use Globals with the MATLAB Function Block

21 Tage vor | 0

Beantwortet
Modify In/Output Port names with a MATLAB script
Something like this: [~,~,InPortNames]=xlsread('ExcelFileName'); % read Excel file to get PortNames as a cell array InPorts=fi...

24 Tage vor | 0

Beantwortet
Dynamic Modeling of Wheel-track Composite Vehicle
Vehicle Dynamics Blockset has dual track model as well as wheel/tire dynamics. Not sure if this meets your need or whether you h...

25 Tage vor | 0

Beantwortet
Is it possible to convert a referenced Configset to a regular Configset that is not referenced from an sldd?
copy, attach and setActive. similar to the example here? https://www.mathworks.com/help/simulink/slref/simulink.configsetref.ht...

26 Tage vor | 0

Beantwortet
I noticed that some GoTo and From signals (input port no. 1) are not connected properly after the transfer (from one system to another system) of the model.
The number on top of the line indicates the size of the signal. "1" means a scalar. "2" means 1x2 or 2x1 vector. "?" means it ca...

26 Tage vor | 0

| akzeptiert

Beantwortet
How to achieve fan rpm with increasing step size?
The "step" increase you saw is probably determined by your lookup data and simulation step size. What you really need is proba...

28 Tage vor | 0

| akzeptiert

Beantwortet
Does anyone know which Simulink Block this is?
It looks like the "Fcn" block specified as "u(1)". It is used to pick out the first element. https://www.mathworks.com/help/re...

28 Tage vor | 1

| akzeptiert

Beantwortet
How to skip an empty value
You can use isempty(rp) to check, and then ignore as needed.

28 Tage vor | 0

| akzeptiert

Mehr laden