Answered

Animating crank mechanism for loop troubles

Use this algorithm hold on for i = 1:n h(1) = plot(); h(2) = plot(); pause(0.1) delete(h) end hold off

Animating crank mechanism for loop troubles

Use this algorithm hold on for i = 1:n h(1) = plot(); h(2) = plot(); pause(0.1) delete(h) end hold off

ongeveer 13 uur ago | 0

Answered

Line integral over a 3D surface

Here is a short example [X,Y,Z] = peaks(20); x = linspace(-2,2,50); y = linspace(-1,3,50); z = interp2(X,Y,Z,x,y); surf(X...

Line integral over a 3D surface

Here is a short example [X,Y,Z] = peaks(20); x = linspace(-2,2,50); y = linspace(-1,3,50); z = interp2(X,Y,Z,x,y); surf(X...

1 dag ago | 0

Answered

ODE: How can I trace changing of all parts of equation during solving

What about this? [t,y] = ode45(@(t, y) chuaModIris(t, y, alpha, beta, A, C, u1st), t, y ); plot3(y(:,1),y(:,2),y(:,3)) ...

ODE: How can I trace changing of all parts of equation during solving

What about this? [t,y] = ode45(@(t, y) chuaModIris(t, y, alpha, beta, A, C, u1st), t, y ); plot3(y(:,1),y(:,2),y(:,3)) ...

1 dag ago | 0

| accepted

Answered

colormap as a function of value

Did you try to color lines separately? contourf(x,y,z,10:15,'color','r') cmap1 = jet(10); hold on for i = 7:10 contourf...

colormap as a function of value

Did you try to color lines separately? contourf(x,y,z,10:15,'color','r') cmap1 = jet(10); hold on for i = 7:10 contourf...

1 dag ago | 0

| accepted

Answered

how to solve this equation of motion?

Here is an idea: function main % define constants m1 = ... m2 = ... function dy = myode(t,u) x = u(1); ...

how to solve this equation of motion?

Here is an idea: function main % define constants m1 = ... m2 = ... function dy = myode(t,u) x = u(1); ...

2 dagen ago | 0

Answered

help with plotting needed!

Use plot clc,clear HQ10 = [1 1.5 1.7 1.6 1.8 2.1 2.2 2.5]; HQ100 = [1.9 2 2.2 2.5 2.7 2.9 3 3.1]; HQ1000 = rand(1,length(H...

help with plotting needed!

Use plot clc,clear HQ10 = [1 1.5 1.7 1.6 1.8 2.1 2.2 2.5]; HQ100 = [1.9 2 2.2 2.5 2.7 2.9 3 3.1]; HQ1000 = rand(1,length(H...

4 dagen ago | 1

| accepted

Answered

surf creates two surfaces, one matches the data points but the other incorrectly connects opposite edges directly

Try x1 = linspace(min(x),max(x),5); y1 = linspace(min(y),max(y),5); [X,Y] = meshgrid(x1,y1); Please use special buttons

surf creates two surfaces, one matches the data points but the other incorrectly connects opposite edges directly

Try x1 = linspace(min(x),max(x),5); y1 = linspace(min(y),max(y),5); [X,Y] = meshgrid(x1,y1); Please use special buttons

5 dagen ago | 0

| accepted

Answered

Symbolically differentiation a function w.r.t a function

Try this syms g(x) h(x) x f g(x,f) = sqrt(f^2 + x); h(x,f) = diff(g(x,f),f)

Symbolically differentiation a function w.r.t a function

Try this syms g(x) h(x) x f g(x,f) = sqrt(f^2 + x); h(x,f) = diff(g(x,f),f)

5 dagen ago | 1

| accepted

Answered

rotating this curve 20degrees

Use rotation matrix a = 15; R = [cosd(a) sind(a); -sind(a) cosd(a)]; v = R*[t(:) sdata(:)]'; plot(v(1,:),v(2,:))

rotating this curve 20degrees

Use rotation matrix a = 15; R = [cosd(a) sind(a); -sind(a) cosd(a)]; v = R*[t(:) sdata(:)]'; plot(v(1,:),v(2,:))

6 dagen ago | 0

Answered

Find the orientation of the skeletonized image

You can write your own function: use imline to create a line draw a line aligned with horizontal/vertical one calculate the ...

Find the orientation of the skeletonized image

You can write your own function: use imline to create a line draw a line aligned with horizontal/vertical one calculate the ...

7 dagen ago | 0

Answered

How to calculate a curvature of 3D isosurface?

You can use surfnorm to extract normal vectors from surface Choose close enough vectors to calculate curvature Angle between ...

How to calculate a curvature of 3D isosurface?

You can use surfnorm to extract normal vectors from surface Choose close enough vectors to calculate curvature Angle between ...

8 dagen ago | 0

Answered

i did some changes in red,green,blue channel of the image .Now when is am using cat function it is giving me full white image.This is not the output i want

You have white image because of format. Try imshow(uint8(new_img)); your code can be shorter (no for loop needed) image=imrea...

i did some changes in red,green,blue channel of the image .Now when is am using cat function it is giving me full white image.This is not the output i want

You have white image because of format. Try imshow(uint8(new_img)); your code can be shorter (no for loop needed) image=imrea...

8 dagen ago | 1

| accepted

Answered

How to locate the vortex eyes in a vector field without using the data cursor and find the circulation around the eye.

You want to find velocities inbetween [0,-30.46]. So just select appropriate indices: idx = -30.46 < vy & vy <= 0; vy1 = vy; ...

How to locate the vortex eyes in a vector field without using the data cursor and find the circulation around the eye.

You want to find velocities inbetween [0,-30.46]. So just select appropriate indices: idx = -30.46 < vy & vy <= 0; vy1 = vy; ...

8 dagen ago | 0

Answered

Solving system of eqution using vectors

You should create a system of equations. You need 4 points and 4 equations syms x0 y0 z0 r0 eq1 = (x0-x(1))^2 + (y0-y(1))^2 + ...

Solving system of eqution using vectors

You should create a system of equations. You need 4 points and 4 equations syms x0 y0 z0 r0 eq1 = (x0-x(1))^2 + (y0-y(1))^2 + ...

9 dagen ago | 0

Answered

Solve a large composite set of equations numerically

I think there is no exact solution for k. Try something like this: % 1 [X,Y,Z] = ndgrid( linspace(-1e5,1e5,20) ); f = fx*X + ...

Solve a large composite set of equations numerically

I think there is no exact solution for k. Try something like this: % 1 [X,Y,Z] = ndgrid( linspace(-1e5,1e5,20) ); f = fx*X + ...

9 dagen ago | 0

Answered

How can I join points with line

Try to reshape data a1 = reshape(a,[],2); b1 = reshape(b,[],2); plot(a1,b1) % plot(a1',b1') % another variant

How can I join points with line

Try to reshape data a1 = reshape(a,[],2); b1 = reshape(b,[],2); plot(a1,b1) % plot(a1',b1') % another variant

10 dagen ago | 0

Answered

solving odes that matrices should be update in every step.

I made some changes in your code. Pay attention to refreshing parameters: function sdot = ODEFUN(t,x) g1 = interp1...

solving odes that matrices should be update in every step.

I made some changes in your code. Pay attention to refreshing parameters: function sdot = ODEFUN(t,x) g1 = interp1...

10 dagen ago | 0

Answered

calculation the angle betwen X-axis created due coordinate system rotation - after projection the coordinate system on the plane

Here is an idea of how to project axis onto plane: Unit vector (normal) of a plane: Distance to plane: Axis projected onto pl...

calculation the angle betwen X-axis created due coordinate system rotation - after projection the coordinate system on the plane

Here is an idea of how to project axis onto plane: Unit vector (normal) of a plane: Distance to plane: Axis projected onto pl...

10 dagen ago | 0

Answered

how to generate a circel which filed with regular points?

Here is an idea: Increase radius: Number of points on radius:

how to generate a circel which filed with regular points?

Here is an idea: Increase radius: Number of points on radius:

10 dagen ago | 0

| accepted

Answered

Error solving Boundary value Problem using bv4pc function

Try r = 1e-3 I think you forgot about dydr(1) and dydr(3) function dydr = odefun(r,y,phi,chi) dydr=zeros(4,1); % dydr(1) =...

Error solving Boundary value Problem using bv4pc function

Try r = 1e-3 I think you forgot about dydr(1) and dydr(3) function dydr = odefun(r,y,phi,chi) dydr=zeros(4,1); % dydr(1) =...

11 dagen ago | 0

| accepted

Answered

ODE15s running slowly for ODE with long expressions

Moreover, whenever I paused the computation to see what was happening, it always paused in files like 'sym', 'char', 'size', 'di...

ODE15s running slowly for ODE with long expressions

Moreover, whenever I paused the computation to see what was happening, it always paused in files like 'sym', 'char', 'size', 'di...

13 dagen ago | 0

| accepted

Answered

How to change the position of arrow in quiver from head/tail to middle of the line?

Use scale scale = 0.5; quiver(...,scale)

How to change the position of arrow in quiver from head/tail to middle of the line?

Use scale scale = 0.5; quiver(...,scale)

15 dagen ago | 0

Answered

Graph of time against angle for multiple values of theta

You'll have only 2 curves: a=1; g=9.81*100; theta = linspace(1,7,20)*pi/16; hold on for h0 = [30 40] tau = ((h0.^(5/2))...

Graph of time against angle for multiple values of theta

You'll have only 2 curves: a=1; g=9.81*100; theta = linspace(1,7,20)*pi/16; hold on for h0 = [30 40] tau = ((h0.^(5/2))...

15 dagen ago | 0

| accepted

Answered

how to solve this bvp4c?

I re-wrote the main equations (compare yours and mine) and tried b = 1 Check the attachment

how to solve this bvp4c?

I re-wrote the main equations (compare yours and mine) and tried b = 1 Check the attachment

17 dagen ago | 0

| accepted

Answered

Calculate the distance between objects area using matlab.

Use this I1 = edge(I); [m,n] = size(I1); ldist = zeros(1,m); for i = 1:m ind = find(I1(i,:)); % find ind...

Calculate the distance between objects area using matlab.

Use this I1 = edge(I); [m,n] = size(I1); ldist = zeros(1,m); for i = 1:m ind = find(I1(i,:)); % find ind...

18 dagen ago | 1

| accepted

Answered

how will i get a mesh in 2d region

I tried to simplify the task (plain rectangle instead of ellipse(cylinder)) Here is what i got clc,clear data = load('simpl...

how will i get a mesh in 2d region

I tried to simplify the task (plain rectangle instead of ellipse(cylinder)) Here is what i got clc,clear data = load('simpl...

21 dagen ago | 0