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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 1

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

Respondida
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?

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

| aceptada

Cargar más