Answered
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

6 years ago | 0

Answered
How to plot a horizontal line?
Try this

6 years ago | 1

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

6 years ago | 0

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

6 years ago | 1

| accepted

Answered
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(:); %...

6 years ago | 0

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

6 years ago | 0

| accepted

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

6 years ago | 1

| accepted

Answered
Help me with ode45 please
Try this modification

6 years ago | 0

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

6 years ago | 0

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

6 years ago | 0

| accepted

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

6 years ago | 0

| accepted

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

6 years ago | 0

| accepted

Answered
Nested for loop plots
Use this solution

6 years ago | 0

| accepted

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

6 years ago | 0

| accepted

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

6 years ago | 1

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

6 years ago | 0

| accepted

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

6 years ago | 0

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

6 years ago | 1

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

6 years ago | 0

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

6 years ago | 0

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

6 years ago | 0

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

6 years ago | 0

| accepted

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

6 years ago | 0

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

6 years ago | 0

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

6 years ago | 0

| accepted

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

6 years ago | 0

| accepted

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

6 years ago | 0

| accepted

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

6 years ago | 1

| accepted

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

6 years ago | 1

Load more