Answered
Matlab range and angle
I'd just use cart2sph (built-in function) TargetLoc = [0;-250;0];%target location Origin = [-2000;0;450]; %start point mph=45...

6 years ago | 0

Answered
Plot 3D with Ode45 loop
Try this script (see attachment)

6 years ago | 1

| accepted

Answered
Wrong vaules gotten for solving a differential equation after Matlab ODE45!
You forgout about point here

6 years ago | 0

Answered
angle between three points (in 3D)?
Use dot product

6 years ago | 0

| accepted

Answered
Surface plot from straight line coordinates and their value on z
Concantenate your data into matrix. Look for surf, see how data should look like Also you can use griddata

6 years ago | 0

| accepted

Answered
Fixed-bed reactor problem
You made mistakes I tried another Zspan Zspan = [0 1e-6]; y0 = [0 0 623]; [z y] = ode45(@ODEfun,Zspan,y0); And get this ...

6 years ago | 0

| accepted

Answered
how to solve attached problem using fsolve and ode45??
You need only x7 and x8 initial function main [t,x] = ode45(@func,tspan,[x7 x8]); plot(t,x) function dx = func(~,x) ...

6 years ago | 0

Answered
how to get a mean Z value inside a certain area I set on a plot
Use this ind = (Y-65).^2 + (X-85).^2 <= 45^2; % find indices inside a circle N = sum(ind(:)); ...

6 years ago | 0

| accepted

Answered
Plotting time series of ODE for several initial values in subplot
SOmething like that i think x0=[0, 200 ,100 3 2 1 3 1 2 31 2 1]; % some initial conditions (random) ...

6 years ago | 0

| accepted

Answered
How can I create a 2D line graph from a slice of a 3D surf?
Use interp2 or contour

6 years ago | 1

| accepted

Answered
How to generate and plot a 3D structured mesh in MATLAB?
Try [X,Y,Z] = meshgrid(x,y,z); plot3(X(:),Y(:),Z(:),'ok')

6 years ago | 1

| accepted

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

6 years ago | 0

Answered
3d slice on Patch figure
Use contour

6 years 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...

6 years 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)) ...

6 years 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...

6 years 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); ...

6 years ago | 1

Answered
how can i solve this error?
Oops?

6 years 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...

6 years 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

6 years 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)

6 years 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,:))

6 years ago | 1

Answered
Creating a 2D temperature plot
Use griddata. It's the easiest way

6 years 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 ...

6 years 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 ...

6 years 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...

6 years 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; ...

6 years ago | 0

| accepted

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

6 years 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 + ...

6 years 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

6 years ago | 0

Load more