Answered
Solving system of ODEs
What if just solve 2 systems? First one (t <= tau) with initial conditions: X(0) = X0, Y(0) = Y0 [t, Var] = ode45(...); %...

7 years ago | 0

Answered
Trouble getting stuck in while loop for finite difference method problem
Define newMesh: % newMesh(m,n)=mesh(m,n); % only (7,7) element will be nonzero newMesh = mesh; % use this instead H...

7 years ago | 0

Answered
I want to follow my object in the plot
I made a simple example for you clc,clear x = linspace(0,4); y = x.^2; plot(x(1),y(1)); hold on for i = 2:length(x) p...

7 years ago | 1

Answered
How can I connect two points on the world map with an arrow pointing at one end?
I'd draw it manually if the line is vertical or horizontal: x = [2 2]; y = [0 -4]; % line plot(x,y) hold on plot([0 ...

7 years ago | 0

Answered
Geometric Analysis of cross-seciton
Simple formula of polygon centroid: WIKI

7 years ago | 0

| accepted

Answered
Circle rotating and whirling
Look at my idea. Do you like it? t = linspace(0,2*pi); x = cos(t); y = sin(t); plot(3*x,3*y) % plot circle of...

7 years ago | 0

Answered
How can I plot a 3D matrix as a cube with different transparent colors for the values?
Since you have matrix of 0,1,2,3 and don't have coordinates you can create them Assume A - is you matrix (N x N x N) % (:) - c...

7 years ago | 0

| accepted

Answered
Create a line of particular length and orientation
Draw line in 45 degree approximately at [25,25] x = [0 5]+rand+25; y = [0 5]+rand+25; plot(x,y)

7 years ago | 0

| accepted

Answered
How to go through every point on x-y plane(0,1)×(0,1) for a function?
I think this part of the code is not effective. For loop will be repeating even if the point is out of the boundary. I'd use whi...

7 years ago | 0

Answered
distance between 2 no-parallel planes
Use this simple drawing to achieve your goal

7 years ago | 0

| accepted

Answered
spline interpolation image way to connect ?
When you have a curve something like this and want to get smooth red curve You do x = [x1 x2 ... xn] % all ...

7 years ago | 0

Answered
How can I plot something like this ?
You have to think how to draw many lines with different colors. I'd use jet() colormap Simple example cm = jet(256); ...

7 years ago | 0

Answered
How to extract curve data from such a JPEG image?
Try this simple script. Like it please We have a picture with green pixels. What we gonna do now?

7 years ago | 0

| accepted

Answered
Evaluate shaped areas of a matrix
what about inpolygon()? can you please accept my answer?

7 years ago | 0

| accepted

Answered
How to Make Circle Rotate and Revolve
Like my idea if i helped you

7 years ago | 0

Answered
How can I plot different quadrilateral with different range of coordinates per node?
Look at my soultion clc,clear x = [-1 1 1 -1]*25; y = [-1 -1 1 1]*25; plot(x,y,'or'); % plot original node...

7 years ago | 0

| accepted

Answered
how to generate planar projections from a 3d model
You want crossection of a surface in Z and other planes. Here is an example: clc,clear [X,Y,Z] = peaks(40); figure(1) cont...

7 years ago | 0

Answered
How can these equations be converted into the format to be input in bvp4c ODE solver ?
This is an example from mathworks It is yours % u(-1) == ya(1) % du(-1) == ya(2) % u(1) == yb(1) % du(1) == yb(2) u(...

7 years ago | 1

| accepted

Answered
interpolate curve to some blob
Find center of a circle and radius A - start point ( - direction vector ) B - End point (mass center?) M - middle point be...

7 years ago | 0

| accepted

Answered
How to find the extremum search curve of a parametric surface?
If you have specific point (local max or min) you can substitute (x0,y0) in your function - first search curve (any x) - sec...

7 years ago | 1

| accepted

Answered
Using findpeaks from a certain point
If the data is [x;y] [pks, locs] = finpeaks(y); x(locs(2)) - x(locs(1)) % dinstance in X direciton between first tw...

7 years ago | 0

Answered
How to reflect a curve
If you know the angle of a line you can just flip the curve then rotate on 2a xnew = x*cos(2*a) - (-y)*sin(2*a); ynew = x*sin(...

7 years ago | 0

Answered
How to solve the intersections between helix and sphere?
You have to find t where distance from center coordinates to helix equals sphere radius x = r*cos(w*t)+x0; y = r*sin(w*t)+y0; ...

7 years ago | 0

| accepted

Answered
3d plot of a wave equation solution
I used formula to generate x,y,z (t=1) and u0 = u(x,y,z,1) as color? Calculation takes some time. How to vectorize it? That is...

7 years ago | 1

| accepted

Answered
non-linear coupled second order ODE with matlab
According to Torsten suggestions function bvp4c_mathworks rspan = [0.05 1]; init = zeros(1,4); solinit = bvpinit(rspan,init)...

7 years ago | 0

| accepted

Answered
Plotting path on torus
Look HERE Take a closer look on formulas

7 years ago | 0

Answered
Change of surface in a rectangular tank
I suggest you to clarify your code. There are some errors i think x=pi x0=0.05; omega=3; beta0=0.1; g=10; z0=(1-(beta0*g)*...

7 years ago | 0

| accepted

Answered
Finding the 2 closest coordinates for a point
[D,I] = pdist2(X,Y,'euclidean','Smallest',1); Im gonna be MVP (Most Valueble Person), maybe MathWorks will start to pay me. Acc...

7 years ago | 1

| accepted

Answered
Calculate volume below a 3D points
Which volume do you want to calculate? Values of surface are below and above also I tried rough method: values of Z in each ...

7 years ago | 0

| accepted

Answered
Integral of my area
Is it correct? for i = [20 30 31 40] t = VVV{i}; ErT1{i} = trapz(t(550:554)); end % ErT1{i}=trapz(VVV{i}) ; % VV- ...

7 years ago | 0

| accepted

Load more