Answered
How to find the circle/ contour of my shape and the distance from the outer contour to the center of the shape?
Binarize image (0 and 1) imdilate image Use edge Maybe bwareopen to clear a bit

6 years ago | 0

| accepted

Answered
Solution to nonlinear differential equation
Here is an attempt function bvp4c_mathworks solinit = bvpinit([-1 1],[0 0]); %[-inf, inf] replaces with [-1, 1] sol = ...

6 years ago | 0

| accepted

Answered
3D plotting of Excel Data
Use plot and pause to animate the movement plot3(x,y,z) hold on for i = 2:length(x)-1 ii = i-1:i+1; h = plot3(x(ii)...

6 years ago | 0

| accepted

Answered
How to plot the elements of a matrix with a specific coordinates and specified the region in matlab?
Maybe inpolygon n = 100; t = -linspace(0,2*pi,n)+pi/2; x = cos(t); y = sin(t); x0 = 0.5; % po...

6 years ago | 1

| accepted

Answered
Extract an elevation profile along at specific azimuth using improfiler
Here is simple scheme that should help You can find size of an image [m,n,k] = size(I); x1 = n/2; % half of ...

6 years ago | 0

| accepted

Answered
Plotting solution of equation
Experiment! d = 1e-3; % plate thickness [m] h = d/2; ct = 2.26 * 1e-3 / 1e-6; % transverse wave speed for aluminium[m/s] ome...

6 years ago | 0

Answered
Draw a matrix image of blood vessel
Would it be helpfull? n = 10; dt = .1; [x, y, z] = deal( zeros(2,10) ); axis([-1 1 -1 1]*10) hold on k = 0; t = 360*(rand...

6 years ago | 0

| accepted

Answered
Plot a heatmap from a matix
You are using H for rows and W for columns M1 = zeros(H,W); % ... for i = 1 : W for j = 1 : H % ... M1...

6 years ago | 0

| accepted

Answered
Trying to graph a 3 variable probability function
Use isosurface to visualize [a,b,c] = meshgrid(0:0.1:2); f = 1./(3.5*a+2.5*b+3*c+1); cla hold on for fk = 0 :0.1:1 iso...

6 years ago | 0

Answered
How to solve this two variable equation and save values?
Try for K = 0:100 roots([1 2 K 2]) end

6 years ago | 0

Answered
Contour or mesh plot of irregular-spaced data
Use griddata to convert your vectors into matrices

6 years ago | 0

Answered
Is this a Matlab bug? The use of Ctrl + A to select all
You can add bookmark to return to your line. Crtl+F2 and just F2 Please accept my answer give me a vote

6 years ago | 1

Answered
Width of my plot
You can find intersection between data and perpendicular line You can rotate data and find intersection Use polyxpoly or int...

6 years ago | 0

| accepted

Answered
ODE coupled with classic equation
Try this E = @(t) E0*exp(-t^2/tau^2)*cos(w0*t); w = @(t) a/E(t)*exp(-b/E(t)); rho = @(t,rho) w(t)*(rho-rho0); [t,r] = ode45(...

6 years ago | 0

| accepted

Answered
Converting pixel coordinates to latitude and longitude in decimal degrees for a binary image.
You forgot about concantenating (cat) function A= geotiffread('ems_a&n_subset.tif'); A(A>=0.99500)=0; y = im2bw(A); r = re...

6 years ago | 0

Answered
Remove single pixel width connecting lines between objects
Here is an idea: find large areas and merge them to remove walls I = imread('image.png'); I1 = im2bw(I); % I2 = bwmorph(~I1,'...

6 years ago | 0

Answered
world or continental Maps on slice
Example A = imread('ngc6543a.jpg'); [m,n,~] = size(A); N = 100; % number of points for surface Z ...

6 years ago | 0

Answered
Colouring Tetramesh - Element wise
Manipulate with faceVertexCData property if you want to assing some colors get(p) %% FaceVertexCData = [ (72 by 1) do...

6 years ago | 1

| accepted

Answered
How to draw ellipse and identify its center around numerous points with Lat and Lon ?
You can identify bigger axis of ellipse (and it's angle) using pdist2 or just find two furthermost points.

6 years ago | 0

Answered
Connecting dots with straight line in a loop.
Just use plot function plot(x(index),y(index))

6 years ago | 0

Answered
Using a loop and counter for parametric equations
Preallocate array before loop E = zeros(3-1+1,22-5+1,6-5+1); for %% E(H,T,h) = ... end

6 years ago | 0

Answered
ode45 2nd order IVP **please help!!**
You are almost there! Yyou written function for ode45 but you didn't use it! function yprime = ex3_2ndorder(x,y) %name and dat...

6 years ago | 3

| accepted

Answered
How do I create some code that will check angles and select the next point to draw a line to based on smallest angle?
Here is some start What about these? See attached script

6 years ago | 0

Answered
Colormap color levels on cursor
Here is direction You have position of cursor in variable pos You can access to FaceVertexCData with command get(h,'FaceVerte...

6 years ago | 0

| accepted

Answered
How to assign specific colors to every quiver?
You can manually assign color to each vector clc,clear [x,y] = meshgrid(0:0.2:2,0:0.2:2); u = cos(x).*y; v = sin(x).*y; ...

6 years ago | 0

Answered
anyway to give separate color to 'stack' bar plot
Do you have colors you want to paint bars into? for i = 1:length(hBar) h1 = get(hBar(i),'Children'); n = length( get(...

6 years ago | 0

Answered
how to plot individual particle velocites in a closed space
Here is what i invented clc,clear A = readtable('ploc.txt'); A1 = A; k = 1; for i = 0:10 ii = (1:561) + 561*i; ...

6 years ago | 0

| accepted

Answered
Plotting bacterial growth using odes
How do you know that it is the correct order (why not S,X,P ?) y0 = [X0 S0 P0]; Try this to plot X vs S [t,ysol] = ode45(M,in...

6 years ago | 0

Answered
remove outliers from a circumference
Here is an idea: x0 = mean(x); % Choose some center point (maybe approximately) y0 = mean(y); [t,r] ...

6 years ago | 0

| accepted

Answered
How would one update the plotted data without resting the figure axes labels and other format elements?
Use hold on command %% FORMATING ELEMENTS figure(1) xlabel('Width, $m$','Interpreter','Latex') ylabel('Depth, $m$','Interpre...

6 years ago | 0

Load more