T=tform(T); %4x4
odefun := (x,y) -> x - y + 1.0: ysol = RK4(odefun, [0.0, 1.0], 1.0, 0.1): with(linalg): t := row(convert(ysol, matrix), 1): y := row(convert(ysol, matrix), 2): t := convert(t, Vector): y := convert(y, Vector): dataplot(t, y) 运行结果如下。 参考文献...
程序首先求得segement线段的单位切向量和法向量,根据公式3计算出从节点x1到主面segement的距离gNs,程序中用GAPN表示;接下来就根据gNs的正负来判断是否发生穿透,如果为负值,说明发生node to segement接触,根据公式11计算从节点x1对应的主面上投影接触点的参数坐标ξ,程序中用alpha表示。然后通过判断alpha是否在[0,1]之...
DateConvert converts the DATESTR(0) format to a date vector or serial date number and backwards.Matlab's DATENUM, DATEVEC and DATESTR accept a variety of inputs, but in consequence they are slow. If the input format is exactly known, the conversion can be much faster: ...
techniques are array preallocation and vectorization.Preallocationcan improve performance by avoiding dynamic memory allocation.Vectorizationenables you to avoid loops by operating on all the elements of a vector in a single command. Together, these techniques can speed up code by several orders of ...
smistad/3D-Gradient-Vector-Flow-for-Matlab - This is an implementation of Gradient Vector Flow (GVF) for 3D in Matlab. It is based on the original 2D implementation of Xu and Prince. sjtrny/FuseBox - MATLAB library for pansharpening and image fusion sjchoi86/TrackDrive - Track driving sim...
rae2xyz Convert range-azimuth-elevation to Cartesian coordinates. randunit Create random unit vector(s) of specified dimension. vecplot Allows vecplot(x, ...) instead of plot(x(1,:), x(2,:), x(3,:), ...). vmag Calculate magnitude (2-norm) of each column. vmag2 Calculate the ...
%% Generating an input signal with unit power => (power_db = 0) % Ip is vector (n0 ,1) , simulation time:T=0.1 sec IP_no=(1/(sqrt(2))).*(randn(1,n0)+(1j*randn(1,n0))); IP_T=(1/(sqrt(2))).*(randn(1,length(t))+(1j*randn(1,length(t))); IP...
%% Generating an input signal with unit power => (power_db = 0) % Ip is vector (n0 ,1) , simulation time:T=0.1 sec IP_no=(1/(sqrt(2))).*(randn(1,n0)+(1j*randn(1,n0))); IP_T=(1/(sqrt(2))).*(randn(1,length(t))+(1j*randn(1,length(t))); IP...
Four New Angle-Unit Conversion Functions The following functions have been added for efficient conversion of angle units (degrees or radians) when either the target or destination units (but not both) are unknown before run time. toDegrees— Convert angles to degrees ...