Beantwortet
though code seems to be correct there is some problem coupler is getting stretched in half rotation
Try this solution find angle rotate by angle

etwa 6 Jahre vor | 0

Beantwortet
How to plot a horizontal line?
Try this

etwa 6 Jahre vor | 1

Beantwortet
how to save results from every loop with permutation
Use reshape i = 1:9; a = reshape(i,[],3);

etwa 6 Jahre vor | 0

Beantwortet
Can you use an image gradient to complete a quiver plot?
Try this madness I0 = imread('image.png'); I1 = rgb2gray(I0); % convert to gray/intensity I1 = double(I1); ...

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
Change color of points if the coordinates are the same
Here are some recommendations: Add these lines into your code Add these lines at the end of your code xx = xx(:); %...

etwa 6 Jahre vor | 0

Beantwortet
Calculate Difference between motion vectors
Make matrices the same size with interp2 clc,clear x = xlsread('motionvectors.xls',1); y = xlsread('motionvectors.xls',2); ...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
Detect abrupt change in trajectory (coordinates)
What about this? Just diff and atan2d load sampletrajectory.mat tr = table2array(trajectories1); % convert to array x ...

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
Help me with ode45 please
Try this modification

etwa 6 Jahre vor | 0

Beantwortet
How do I integrate a matrix?
What about this? R = 5; r = linspace(0,R,100); T = rand(50,100); rr = repmat(r,50,1); % 2d matrix r F1 = 3/R...

etwa 6 Jahre vor | 0

Beantwortet
how to normalize results from ode45
What if just to scale the data? clc,clear x = -1:.1:1; y = 2 - x.^2; plot(x,y) % plot original data s = trapz(x,y...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
Problem with data triangulation
It's because of different scales try to scale your data dx = max(x)-min(x); y1 = (y-min(y))/(max(y)-min(y))*dx; T = delaun...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
Modify matrix for partial plot
Here are your bourndary conditions n = 40; x = linspace(0,8,n); dx = x(2)-x(1); y = x; dy = dx; U = zeros(n); U(n,1:n/2) =...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
Nested for loop plots
Use this solution

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
How to make a curve line through data points on surface 3D (curve line fitting in 3D)
Try this solution x0 = x1([8 2 5 11]); y0 = x2([8 2 5 11]); yy = linspace(min(y0),max(y0),20); xx = interp1(y0,x0,yy); zz =...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
How to get set of outermost points out of given data set
I calculated angle of each point. Sortet by angle to put them in some order Used polyxpoly to find intersection points p...

etwa 6 Jahre vor | 1

Beantwortet
Error: A and B must be floating point scalar? Using Integral function.
Try this solution

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
How to create array alternating with 4 elements from one and 4 elements from another
Try this simple solution A = [1 2 3 4 5 6 7 8]; B = [11 12 13 14 15 16 17 18]; A1 = reshape(A,[],4); B1 = reshpae(B,[],4); ...

etwa 6 Jahre vor | 0

Beantwortet
2nd Order Nonlinear Differential Equation Solving with Newton Method
You can try dsolve or re-write your equations and use ode45 Express = ... ddtheta = @(th,dth) m3*b1^2*dth^2*sin(th)*cos(th) -...

etwa 6 Jahre vor | 1

Beantwortet
Are you able to count the number of pixels in a 3D plot?
Can you calculate the volume manually? dv = [dx(:,i+1)-dx(:,i) dy(:,i+1)-dy(:,i) dz(:,i+1)-dz(:,i)]; V = V + pi*R*sqrt(sum(d...

etwa 6 Jahre vor | 0

Beantwortet
How can I plot a 2D array using polar coordinates?
Convert your data to cartesian system of coordinates A = xlsread('data.xlsx'); %% t = linspace(0,pi/2,size(A,1)); % create an...

etwa 6 Jahre vor | 0

Beantwortet
How can I fit a custom function that contains workspace vector variables?
Try following recommendations

etwa 6 Jahre vor | 0

Beantwortet
solve function errors/ faults
It's because of additional space eqns = [-160 +10*i1+v1==0, 96==v2-12*i2,v2/v1==4, i1/i2 == 4 ]; size(eqns) Try this soluti...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
If Statement block throwing array index error
Your is madness. Use cell to make it simpler and shorter fnames = {csv1 csv2 ...} for i = 1:length(fnames) M{i} = r...

etwa 6 Jahre vor | 0

Beantwortet
Solve ODE with function dependent parameters
Try this simple example a = 1/pi^2; x = linspace(0,1,50)'; T0 = 1-(1/2-x).^2; % initial condition t=0 (start time) ...

etwa 6 Jahre vor | 0

Beantwortet
help with vertex transformations
Use arc length interpolation and smooth data [x,y] = pol2cart(-pi:1:pi,5); tt = [0 cumsum(hypot(diff(x),diff(y)))]; % creat...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
write a loop reading txt files to write a xlsx file with specific strings and numbers
try this S = dir('Input_*.txt'); str = {}; num = {}; for k = 1:numel(S) A = importdata(S(k).name); str{k} = A{3,1}...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
Automatically put content of structure fields in a matrix
Try getfield fnames = fieldnames(A); B = []; for i = 1:length(fnames) b1 = getfield(A,fnames{i}); B = [B; b1]; end...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
Creating a vector with a pattern of numbers
Try this pattern a1 = [1 3 1 1]; use repmat and cumsum

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
Integrate 61 x 3 tabular data using Runge Kutta
YOu can create function using interp1 or spline You can write your own solver Simple solver Euler method for i = 1:length(vel...

etwa 6 Jahre vor | 1

Mehr laden