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...

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...

11 days ago | 0

| accepted

Answered

xlsreaderror: "Unable to resolve the name (filename)"

Change the statement to data_final = xlsread('Raw_data_2.xls');

xlsreaderror: "Unable to resolve the name (filename)"

Change the statement to data_final = xlsread('Raw_data_2.xls');

11 days 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...

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...

14 days 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 .*

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 .*

14 days 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)) ...

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)) ...

15 days 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...

15 days ago | 1 answer | 0

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...

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...

2 months 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...

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...

2 months 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.

Can anyone please tell me in which release i find this example ?

Probably R2019a and newer. R2018b doesn't have the example.

2 months 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...

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...

2 months 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...

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...

2 months ago | 0

| accepted

Answered

inherit from two classes simscape

Try the following: component MyComponent < MyBaseComponent1 % component implementation here end component MyExtend...

inherit from two classes simscape

Try the following: component MyComponent < MyBaseComponent1 % component implementation here end component MyExtend...

2 months 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.

How to simulate a variable load

Nonlinear spring is the way to go if you want the force as a function of displacement.

2 months 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'. ...

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'. ...

3 months 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...

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...

3 months ago | 0

Answered

Help in finding the matrix

You can use [row,col]=find( ) to get the location and use == to compare numbers

Help in finding the matrix

You can use [row,col]=find( ) to get the location and use == to compare numbers

3 months 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...

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...

3 months 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...

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...

4 months 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...

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...

4 months ago | 0

Answered

Can I use Simscape for a system dynamic model similar to representing a system by differential equations in Simulink?

There are two ways to use Simscape. 1: use the blocks in the Simscape library. You don't need to write any differential equation...

Can I use Simscape for a system dynamic model similar to representing a system by differential equations in Simulink?

There are two ways to use Simscape. 1: use the blocks in the Simscape library. You don't need to write any differential equation...

4 months ago | 0

| accepted

Answered

How to get eigenvalues and eigenvectors from a mass and spring model build by simscape?

You should be able to get the system matrices (A, B, C, D) for your linerized model. The eigenvalues for A can then be calculate...

How to get eigenvalues and eigenvectors from a mass and spring model build by simscape?

You should be able to get the system matrices (A, B, C, D) for your linerized model. The eigenvalues for A can then be calculate...

4 months ago | 0

Answered

How can I get date and time from Nist server?

str = char(tcpdata) will convert the ascii code to a string. str(8:15) will give you the date. str(17:24) will give you the tim...

How can I get date and time from Nist server?

str = char(tcpdata) will convert the ascii code to a string. str(8:15) will give you the date. str(17:24) will give you the tim...

4 months ago | 2

| accepted

Answered

Ode solver varying parameters

You put the derivative calculation in a file such as fcn.m, function dx = fcn(t,x) dx = zeros(3,1); p7 = t; %p7=a*b^y*c^z; ...

Ode solver varying parameters

You put the derivative calculation in a file such as fcn.m, function dx = fcn(t,x) dx = zeros(3,1); p7 = t; %p7=a*b^y*c^z; ...

5 months ago | 0

Answered

Degenerate mass distribution error with Simulink Simscape Multibody joints

This might help you https://www.mathworks.com/matlabcentral/answers/244110-model-walking-body-in-simulink#answer_193147

Degenerate mass distribution error with Simulink Simscape Multibody joints

This might help you https://www.mathworks.com/matlabcentral/answers/244110-model-walking-body-in-simulink#answer_193147

5 months ago | 0

Question

Input a structure variable to a Matlab Function block

How can I input a structure variable (struct data type) to a Matlab Function block? The document states that I specify the param...

7 months ago | 1 answer | 0

Question

Pyramid shape solid in Simscape Multibody

Is it possible to generate a pyramid shape solid in Simscape Multibody without using an imported CAD file?

8 months ago | 0 answers | 0

Answered

How to animate the simulation of a multibody system if I have already setup the simulink model of my system (not using simcape)?

A possible solution is to use multiple Cartensian Joints and Gimbal Joints in the Simscape Multibody. Set the Force and Moton fi...

How to animate the simulation of a multibody system if I have already setup the simulink model of my system (not using simcape)?

A possible solution is to use multiple Cartensian Joints and Gimbal Joints in the Simscape Multibody. Set the Force and Moton fi...

8 months ago | 0

Answered

Double derivative of a vector of variables in Simscape components.

I would say you must use the second approach: variables eta = {zeros(4,1),'m'}; d_eta = {zeros(4,1),'m/s'}; en...

Double derivative of a vector of variables in Simscape components.

I would say you must use the second approach: variables eta = {zeros(4,1),'m'}; d_eta = {zeros(4,1),'m/s'}; en...

8 months ago | 0

Answered

How to animate the simulation of a multibody system if I have already setup the simulink model of my system (not using simcape)?

Did you try the Simulink 3D Animation package?

How to animate the simulation of a multibody system if I have already setup the simulink model of my system (not using simcape)?

Did you try the Simulink 3D Animation package?

8 months ago | 0

Answered

after import robot from urdf ,how can i sent angles to the joints ,and test my own kinermatic algorithm?

'importrobot' imports files into Robostics System toolbox while 'smimport' imports files into Simscape Multibody (was named SimM...

after import robot from urdf ,how can i sent angles to the joints ,and test my own kinermatic algorithm?

'importrobot' imports files into Robostics System toolbox while 'smimport' imports files into Simscape Multibody (was named SimM...

8 months ago | 0

| accepted