Community Profile

photo

J Chen


Last seen: 4 días ago
42 total contributions since 2019

J Chen's Badges

  • GitHub Submissions Level 1
  • 6 Month Streak
  • Thankful Level 1
  • Personal Best Downloads Level 1
  • First Review
  • First Submission
  • Knowledgeable Level 2
  • Revival Level 1
  • First Answer

View details...

Contributions in
View by

Submitted


CRC-16
A function to generate CRC-16 (16-bit Cyclic Redundancy Check)

4 días ago | 3 downloads |

Answered
How do I select only 100 images in a folder of 200 images, according to a list of 100 different names ?
Use the folllwoing command to get a structure that contains file information listing = dir('*.jpg'); Use the folllwoing comman...

13 días ago | 0

Answered
How to take mean of each row/column of matrix with while loop
You need to update i and j (add 1 to them) at the end of each while loop.

13 días ago | 0

| accepted

Answered
Help writing this integral
Use integral or trapz to integrate, then take the log. You need to find out the expression for p and the integration limits.

13 días ago | 0

Answered
Hello, I am getting this error. Can anyone please help me solving it? Thanks
I guess that the temperature units are 'K', 'degC', 'degF', etc.

14 días ago | 0

Answered
Difference between Simscape and Simulink
Simulink uses block diagram approach. The signal flow is unidirection. Simscape uses physical modeling approach. The signal flow...

14 días ago | 0

Answered
How do you add physical signal lines programmatically?
use h1 = get_param('mymodel/mySubsystem/C_1','PortHandles'); to get the port handles. Use add_line to draw line between the hand...

18 días ago | 0

Answered
User-defined MATLAB function block in Simulink/Simscape
use a statement like z = t / k; % don't use x to get the argument for the table lookup. Then use interp1(x,y,z) to find your ...

18 días ago | 1

| accepted

Answered
modelling in matlab of differential equation
you need an equation for dhw/dt, then use a matlab ode solver to solve the equations. see https://www.mathworks.com/help/matlab/...

18 días ago | 0

Answered
step response of Linear parameter varying model's response different from the step response of original non linear plant
You probably didn't specify the "State derivative/update offset" correctly. You need to uncheck the "Assume equilibrium operatin...

alrededor de 2 meses ago | 0

Answered
Offset ticks and gridlines
Use xticks to place the ticks at the left of each group, e,g,, xticks([0.5 1.5 2.5]). You can use xt = xticks to get the coordn...

alrededor de 2 meses ago | 0

Answered
Vector between vectors in intervals
vec1 = [-0.0345;0.9984;-0.0447]; angle = 5*pi/180; % angle of rotation in rad v = vec1 + tan(angle)*vec2; % length of ve...

3 meses ago | 0

| accepted

Answered
xlsreaderror: "Unable to resolve the name (filename)"
Change the statement to data_final = xlsread('Raw_data_2.xls');

3 meses ago | 0

Answered
How to do animation properly
Draw the cylinder first. Use the "rectangle" command in a loop to draw the piston, e.g., rectangle('position',[x,y,w,h],'FaceC...

3 meses ago | 0

| accepted

Answered
how to subtract/divide corresponding rows and columns of two tables?
put the tables in to two variables of matrices. Use element-wise operation: ./ or .*

3 meses ago | 0

Answered
coverting fortran to matlab
The following statements are wronng h(i,j) = ( h(i-1,j) + h(i+1,j) + h(i,j-1) + h(i,j+1)/4) ; .. e = abs(h(i,j)) ...

3 meses ago | 0

Question


Find the help for sim command in the MPC Toolbox
The sim command can be used to simulate Simulink models or MPC objects. How can I open the Help Browser from the command line fo...

3 meses ago | 1 answer | 0

1

answer

Answered
About the correct connection method of SimscapeMultibody and Simscape block in the calculation of inverse dynamics.
You input torque to the revolute joint block in forward dynamics. Doucle click the block. Expand Actuation and set the Torque to...

4 meses ago | 0

Answered
Connect multiple joints to one solid
You should use a revolute joint between cylinder C and cyliner A. Use another revolute joint between the other end of cylinder C...

4 meses ago | 0

Answered
Can anyone please tell me in which release i find this example ?
Probably R2019a and newer. R2018b doesn't have the example.

4 meses ago | 0

Answered
How to determine if my equation is equal to, less that or more then 0?
The result of sqrt((b^2/(4*a^2))-(c/a)) is a complex number. You can't compare it with 0 (a real number) The formula for dampin...

4 meses ago | 0

| accepted

Answered
how to solve this ?
use s1 = a1*sin(w1*t+phi1), where w1=2*pi*f1 and t is time vector to generate signal 1. Do the the same for signal 2 and 3 and a...

4 meses ago | 0

| accepted

Answered
inherit from two classes simscape
Try the following: component MyComponent < MyBaseComponent1 % component implementation here end component MyExtend...

5 meses ago | 0

Answered
How to simulate a variable load
Nonlinear spring is the way to go if you want the force as a function of displacement.

5 meses ago | 0

Answered
How to fix an invalid data type
The winedata may contain some strange characters. Carefully exame elements of windata. Command class(A) should return 'double'. ...

5 meses ago | 0

Answered
Integral Approximation Equation Using Loop
Generate a vector x=[0 1/N 2/N ... 1]. Calculate corresponding y for each element of x. Use the trapezoid rule to add all the y...

5 meses ago | 0

Answered
Help in finding the matrix
You can use [row,col]=find( ) to get the location and use == to compare numbers

5 meses ago | 0

Answered
Simscape tablelookup input value
Several options: 1) use the Simscape built-in PS Lookup Table (2D) block instead of a custom block. 2) study the example here. 3...

5 meses ago | 0

Answered
Vector input in Simscape Revolute Joint
You can specify the motion of the joint: expand the Actuation, set Torque to Automically Computed and Motion to Provided by Inpu...

6 meses ago | 0

Answered
How can I connect an Hydraulic connection to my Tire model ?
The brake pressure port at the wheel model needs a simulink signal. The Simscape hydraulic system outputs phsical signals. You n...

6 meses ago | 0

Load more