Risposto
i want to draw a streamline at 45 degree.
clc,clear [t,r] = ndgrid(0:5:45,0:10); % create mesh in polar coordinates [x,y] = pol2cart(t*pi/180,r); % con...

quasi 5 anni fa | 0

| accettato

Risposto
How to get all yellow piexels that interact with the blue piexels?
What about contour? [m,n] = size(data); [x,y] = meshgrid(1:m,1:n); [C,h] = contour(x,y,data,[0.9 0.9]); h1 = get(h,'children...

quasi 5 anni fa | 0

Risposto
Compute x and y by integrating the ODE system using Huen's method.
You should use for loop function [x,y] = odeHuen (f,x0,h,nSteps,y0) % Initialize the output solution arrays. m = length(y0);...

quasi 5 anni fa | 0

Risposto
How to evaluate the area of a blob which has maximum centroid value of Y coordinate (lowest blob in a image) ?
Calculate area for each blob then select only one you need

quasi 5 anni fa | 0

Risposto
how to solve PDE with derivative boundary conditions ?
Try these corrections T = zeros(length(t),length(x)); for j=1:length(t)-1 T(j+1,1) = T(j,1) + dt*(T(j,1)-10); T(j+1,...

quasi 5 anni fa | 0

| accettato

Risposto
Newton's Method Graphing
Try this way %Plotting xx = 0:0.1:1; figure plot(xx,functn(xx),'k') %Plotting original funtion hold on plot(initial_guess,...

quasi 5 anni fa | 1

| accettato

Risposto
Plotting the graph of change in Work wrt Crank Angle Degree
What about limits? Here are limits for . But what about limits for ? I think this line should be changed %A(i)=trapz(i, w);...

quasi 5 anni fa | 0

Risposto
Looking for faster inpolygon - testing whether points are inside a polygon
If your polygons are regular try to check points for inside radius first Calculate radius and of polygon Calculate distance ...

quasi 5 anni fa | 0

Risposto
Reshaping a matrix in particular order
Try mat2cell

quasi 5 anni fa | 0

Risposto
Creating a 3-D Plot/Contour Map from Matrix...
Try griddata x = rand(20,1); y = rand(20,1); z = rand(20,1); [x1,y1] = meshgrid(0:0.1:1); z1 = griddata(x,y,z,x1,y1); plot...

quasi 5 anni fa | 0

| accettato

Risposto
How can I createa new flower from this script??
See this modification R2 = x.*(R.*sin(phi) + y.*cos(phi)); RR = (R2-min(R2(:)))./(max(R2(:))-min(R2(:))); % scale inbetwe...

quasi 5 anni fa | 1

| accettato

Risposto
How can I plot Spherical Coordinates, showing R, Theta and Phi, like animated image attached? And Cylindrical Coordinates?
Try this clc,clear t = 0:10:180; [T,R] = meshgrid(0:10:360,0:10); [X,Y] = pol2cart(T*pi/180,R); Z = R; h = surf(X,Y,Z); ...

quasi 5 anni fa | 0

| accettato

Risposto
Hello everyone. For example, how to identify a specific point in an image in a moving video as follows. The required video is also uploaded in zip format. If you are interested, you can discuss with me. Thank you all very much.
Here is an example for extreme points: find points where derivative changes it's sign clc,clear x = 0:0.2:10; y = sin(x); ...

quasi 5 anni fa | 0

Risposto
Using fill to color multiple polygons using input RGB color values.
Try this [x,y] = meshgrid(0:2,0:1); c1(1,1,:) = [0.6 0.6 0.8]; c2(1,1,:) = [0.3 0.3 0.4]; c = [c1 c2 c2;c1 c2 c2]; surf(x,...

quasi 5 anni fa | 0

Risposto
Unable to obtain a smooth 3D Dubins path
See this answer about 3d interpolation of data: LINK

quasi 5 anni fa | 0

Risposto
Need assistance with incorrect output in plot.
Try to change this part x_answer = zeros(npoints,4); % preallocate answer vector x_answer(1,:) = x_vect(1,4); % Initiali...

quasi 5 anni fa | 0

Risposto
"Unable to convert expression containing remaining symbolic function calls into double array. Argument must be expression that evaluates to number"
It's too complicated for symbolic toolbox Use numerical approach

quasi 5 anni fa | 0

| accettato

Risposto
How to determine if a certain color surrounds a specific point in an array?
Try to add some tolerance tol = 10; red1 = abs(double(redArr) - myColor(1))) < tol; blue1 = abs(double(greenArr) - myColor(...

quasi 5 anni fa | 0

Risposto
How can I calculate the percentage of clouds within each grid box i.e. 1 degree x 1 degree?
Here is an example using griddata % x y v are your data % create new mesh 0.1 degree in each direciton x1 = min(x(:))...

quasi 5 anni fa | 0

Risposto
Location of centers of Circular regions
Here is an example I = imread('image.png'); % your image B = im2bw(I); % binarize your image A = reg...

quasi 5 anni fa | 0

Risposto
Plotting a region of a sphere
Her is start: clc,clear [T1,T2] = meshgrid(-60:5:60,-90:5:200); [x,y,z] = sph2cart(T2*pi/180,T1*pi/180,5); [R,T] = meshg...

quasi 5 anni fa | 0

| accettato

Risposto
How not to terminate the polyxpoly loop, when the lines don't intersect?
What about if..else statement? [x,y] = polyxpoly(...); if ~isempty(x) % code end

quasi 5 anni fa | 1

| accettato

Risposto
Segmentation a point cloud data in matlab?
Try clusterdata

quasi 5 anni fa | 0

Risposto
Extract Gridded Data from Isosurface
What about standard functions? [faces,verts] = isosurface(mesh_xs{:}, mesh_data, 0); zz = griddata(verts(:,2),verts(:,1),verts...

circa 5 anni fa | 0

| accettato

Risposto
Trouble solving for extreme values of a differential equation.
You are trying to solve your equation symbolically (to get analytical expression). I think it's impossible Try fsolve or vpasol...

circa 5 anni fa | 0

Risposto
How to plot 3D Matrix (4D Data) as colored cube?
Use slice

circa 5 anni fa | 0

Risposto
Compute Gradient of a Scalar 3-D Field Defined On a non Uniform Grid
What about griddata? % assume x,y,z are your random coordinates % assume u,v,w are your vectors (gradients) % assume that you...

circa 5 anni fa | 0

Risposto
Index exceeds problem in line 19
Cn uses index i i loops through 1:20, but Cn has only 8 elements

circa 5 anni fa | 0

Risposto
Contour maps from lat-lon?
Use griddata to create matrix data Use contour

circa 5 anni fa | 0

Carica altro