Answered

Two-body problem program gone wrong

rddot = -mue*rv/R^3; This line tells that you have non-constant angular acceleration So it's ok if you orbit is changing

Two-body problem program gone wrong

rddot = -mue*rv/R^3; This line tells that you have non-constant angular acceleration So it's ok if you orbit is changing

1 jour ago | 0

Answered

Plotting the iso-surface in a specific range of values

Use for loop to create several value

Plotting the iso-surface in a specific range of values

Use for loop to create several value

2 jours ago | 0

Answered

how can I vectorize my code when multiple variables are present

Try to remove parenthesis

how can I vectorize my code when multiple variables are present

Try to remove parenthesis

3 jours ago | 0

Answered

Solve 4 circles with known centers and radii

You can try to use image processing toolbox clc,clear [x,y] = meshgrid(1:100); A1 = (x-20).^2+ (y-30).^2 < 15^2; A2 = (x-5...

Solve 4 circles with known centers and radii

You can try to use image processing toolbox clc,clear [x,y] = meshgrid(1:100); A1 = (x-20).^2+ (y-30).^2 < 15^2; A2 = (x-5...

3 jours ago | 0

Answered

Help with double for loop

I'll give you a start T= zeros(m,n); % preallocation T(1,:) = % initial condition for i = 1:m-1 for j = 1:n-1 ...

Help with double for loop

I'll give you a start T= zeros(m,n); % preallocation T(1,:) = % initial condition for i = 1:m-1 for j = 1:n-1 ...

3 jours ago | 0

Answered

How to simplify x and y coordinates or numbers

Try meshgrid() [x,y] = meshgrid(1:4,1:3); [x(:) y(:)]

How to simplify x and y coordinates or numbers

Try meshgrid() [x,y] = meshgrid(1:4,1:3); [x(:) y(:)]

5 jours ago | 0

Answered

How can I get the interpolated pathway using control points and visualize it in Volume Viewer?

See this answer: LINK

How can I get the interpolated pathway using control points and visualize it in Volume Viewer?

See this answer: LINK

5 jours ago | 0

Answered

How can I plot a function containing an integral ?

I suggest you to use numerical approach - cumtrapz clc,clear x = linspace(1,15,100); f = 2*x; sf = cumtrapz(x,f); plot(x,...

How can I plot a function containing an integral ?

I suggest you to use numerical approach - cumtrapz clc,clear x = linspace(1,15,100); f = 2*x; sf = cumtrapz(x,f); plot(x,...

6 jours ago | 1

| accepted

Answered

How can I snap my data point to the border for a colormap/heatmap?

Here is the idea create new mesh for the contour interpolate values

How can I snap my data point to the border for a colormap/heatmap?

Here is the idea create new mesh for the contour interpolate values

6 jours ago | 1

Answered

billiard animation, set multiple rectangles, funny guy

Here is an example clc,clear g = 9.8; n = 3; x0 = rand(n,1); y0 = rand(n,1); vx = rand(n,1); vy = rand(n,1); dt = 0.03...

billiard animation, set multiple rectangles, funny guy

Here is an example clc,clear g = 9.8; n = 3; x0 = rand(n,1); y0 = rand(n,1); vx = rand(n,1); vy = rand(n,1); dt = 0.03...

6 jours ago | 0

Answered

Is there a way to count within the pattern, different points in a graph before repeating?

You can round data to integer and use unique x0 = rand(10,1); x1 = round(10*x0); % round data to 1 symbol after the dot ...

Is there a way to count within the pattern, different points in a graph before repeating?

You can round data to integer and use unique x0 = rand(10,1); x1 = round(10*x0); % round data to 1 symbol after the dot ...

6 jours ago | 0

Answered

Surface Integral of discrete data sampled in spherical coordinates

I think you forgout about

Surface Integral of discrete data sampled in spherical coordinates

I think you forgout about

6 jours ago | 0

Answered

A more (computational) performant way to plot multiple scatter3 plots in a figure

Use plot3 instead of scatter3 Scatter is verry expensive function

A more (computational) performant way to plot multiple scatter3 plots in a figure

Use plot3 instead of scatter3 Scatter is verry expensive function

6 jours ago | 0

Answered

Timespan within Ode45

change heade of a function function dYdt = deri_Y(t,Y,m0) call the function for m0 = [0.4 0.5 1] [tSol_1,YSol_1] = ode45...

Timespan within Ode45

change heade of a function function dYdt = deri_Y(t,Y,m0) call the function for m0 = [0.4 0.5 1] [tSol_1,YSol_1] = ode45...

7 jours ago | 0

| accepted

Answered

Comparing the dots in two images and eliminating the dots which don't have pairs

See this example A1 = imread('image1.png'); A2 = imread('image2.png'); I1 = rgb2gray(A1); % convert ot grayscale I2...

Comparing the dots in two images and eliminating the dots which don't have pairs

See this example A1 = imread('image1.png'); A2 = imread('image2.png'); I1 = rgb2gray(A1); % convert ot grayscale I2...

7 jours ago | 0

Answered

Fill a circle with Gaussian districution- like colour contour

here is a shot clc,clear [x,y,z] = sphere(10); pcolor(x,y,z,'edgecolor','none')

Fill a circle with Gaussian districution- like colour contour

here is a shot clc,clear [x,y,z] = sphere(10); pcolor(x,y,z,'edgecolor','none')

7 jours ago | 0

Answered

Offset removal from a sinusoidal wave

I have an idea clc,clear x = linspace(0,20,100); y = sin(x); ind = -0.5<y & y<0.5; x1 = x(~ind); y1 = y(~ind); y1 = y1 ...

Offset removal from a sinusoidal wave

I have an idea clc,clear x = linspace(0,20,100); y = sin(x); ind = -0.5<y & y<0.5; x1 = x(~ind); y1 = y(~ind); y1 = y1 ...

7 jours ago | 0

Answered

Project on Robotic arm lying on the centre of a square where my end effector lying on one corner and it should move from one corner to other corner and pause for 10 milli seconds until it reaches its initial position.

Here is an example clc,clear D1 = 0.2; D2 = 0.15; t = pi/4+(0:pi/2:2*pi); [x,y] = pol2cart(t,sqrt(2)*0.2); % creat...

Project on Robotic arm lying on the centre of a square where my end effector lying on one corner and it should move from one corner to other corner and pause for 10 milli seconds until it reaches its initial position.

Here is an example clc,clear D1 = 0.2; D2 = 0.15; t = pi/4+(0:pi/2:2*pi); [x,y] = pol2cart(t,sqrt(2)*0.2); % creat...

7 jours ago | 0

| accepted

Answered

How can I add the differential equation attached to my script to run in the loop, where n = 4 for the first value of n.

If you have formula for you don't need diff equation T = 1159: 1 : 1358; fr = 1 - exp(-(K*(T-T0)/H).^n); c1 = diff( log(-log...

How can I add the differential equation attached to my script to run in the loop, where n = 4 for the first value of n.

If you have formula for you don't need diff equation T = 1159: 1 : 1358; fr = 1 - exp(-(K*(T-T0)/H).^n); c1 = diff( log(-log...

8 jours ago | 0

Answered

Remove everything outside a defined area

Try initmesh to triangulate example

Remove everything outside a defined area

Try initmesh to triangulate example

8 jours ago | 1

| accepted

Answered

Area calculation of circle projection on cylindric surface

Use sufaceIntersection to find intersection curve Use triangulation to find area: LINK1, decsg, initmesh Here is an example (n...

Area calculation of circle projection on cylindric surface

Use sufaceIntersection to find intersection curve Use triangulation to find area: LINK1, decsg, initmesh Here is an example (n...

8 jours ago | 0

Answered

How to plot streamline for velocity data??

try this clc,clear [x,y,z] = peaks(20); % some data [u,v] = gradient(z); % create direction vectors ...

How to plot streamline for velocity data??

try this clc,clear [x,y,z] = peaks(20); % some data [u,v] = gradient(z); % create direction vectors ...

10 jours ago | 0

Answered

writing a traveling electromagnetic wave

I think your plot should be a surface since you have two dependent variables z and t Here is an example t = linspace(0,200,30)...

writing a traveling electromagnetic wave

I think your plot should be a surface since you have two dependent variables z and t Here is an example t = linspace(0,200,30)...

10 jours ago | 0

Answered

How to switch order of clusters in silhouette plot?

what about this? x = rand(20,1); y = rand(20,1); plot(x(1:15),y(1:15),'.r') hold on plot(x(5:end),y(5:end),'ob') hold off ...

How to switch order of clusters in silhouette plot?

what about this? x = rand(20,1); y = rand(20,1); plot(x(1:15),y(1:15),'.r') hold on plot(x(5:end),y(5:end),'ob') hold off ...

12 jours ago | 0