Answered

Zero Area Triangles in Delaunay Triangulation

What about initmesh? t = linspace(0,2*pi-0.1,20); % unclosed contour (without selfintersection) [x1,y1] = pol2cart(...

Zero Area Triangles in Delaunay Triangulation

What about initmesh? t = linspace(0,2*pi-0.1,20); % unclosed contour (without selfintersection) [x1,y1] = pol2cart(...

2 months ago | 0

Answered

Color gradient for graph in a for loop

Wha about this? x = [0:.2:10 nan]; y = sin(x); patch(x,y,y,'edgecolor','interp','linewidth',2) colorbar

Color gradient for graph in a for loop

Wha about this? x = [0:.2:10 nan]; y = sin(x); patch(x,y,y,'edgecolor','interp','linewidth',2) colorbar

2 months ago | 0

Answered

Area between two curves without intersection

Make sure curves have the same start and end xx = linspace(x1(1),x1(end),100); % new mesh y11 = interp1(x1,y1,xx); ...

Area between two curves without intersection

Make sure curves have the same start and end xx = linspace(x1(1),x1(end),100); % new mesh y11 = interp1(x1,y1,xx); ...

2 months ago | 0

Answered

geodesic distances on a curved surface

Here is an example [x,y,z] = peaks(20); % surface % curve coordinates x1 = linspace(-3,2,20); y1 = linspace(-...

geodesic distances on a curved surface

Here is an example [x,y,z] = peaks(20); % surface % curve coordinates x1 = linspace(-3,2,20); y1 = linspace(-...

2 months ago | 0

| accepted

Answered

What values do I need to put in

What about this? x = 0:40; y = sin(x)./x; plot(x,y)

What values do I need to put in

What about this? x = 0:40; y = sin(x)./x; plot(x,y)

2 months ago | 0

Answered

Extrapolation of potential values to higher order

scatteredInterpolant has extrapolation property. You can also interpolate the data

Extrapolation of potential values to higher order

scatteredInterpolant has extrapolation property. You can also interpolate the data

2 months ago | 0

Answered

Divide the 3D surface into equal patches

Try arc length interpolation. Original link: LINK function main clc,clear % generate some data [x,y] = meshgrid(-1:0.4...

Divide the 3D surface into equal patches

Try arc length interpolation. Original link: LINK function main clc,clear % generate some data [x,y] = meshgrid(-1:0.4...

2 months ago | 0

| accepted

Answered

Matlab code for extract shape features from an image including circle and rectangle

Just binarize the image A = imread('5C54390E-80C8-47DD-9293-822E85D06145.jpeg'); A1 = im2bw(A); L = bwlabel(~A1); ...

Matlab code for extract shape features from an image including circle and rectangle

Just binarize the image A = imread('5C54390E-80C8-47DD-9293-822E85D06145.jpeg'); A1 = im2bw(A); L = bwlabel(~A1); ...

2 months ago | 0

| accepted

Answered

Create 3D plot from 2D contour (length and radius)

See this example z = 0:.1:3; r = sin(z); t = linspace(0,2*pi,20); [T,R] = meshgrid(t,r); [~,Z] = meshgrid(t,z); [X,Y] = po...

Create 3D plot from 2D contour (length and radius)

See this example z = 0:.1:3; r = sin(z); t = linspace(0,2*pi,20); [T,R] = meshgrid(t,r); [~,Z] = meshgrid(t,z); [X,Y] = po...

2 months ago | 1

| accepted

Answered

Divide the 3D surface into equal patches

Try to interpolate in polar system. Find center of a circle clc,clear data = load('curve.txt'); x = data(:,1); y = data(...

Divide the 3D surface into equal patches

Try to interpolate in polar system. Find center of a circle clc,clear data = load('curve.txt'); x = data(:,1); y = data(...

2 months ago | 0

Answered

Program to perform a reshape of an array

Use reshape without for loop M = reshape(W',4,[]);

Program to perform a reshape of an array

Use reshape without for loop M = reshape(W',4,[]);

2 months ago | 0

Answered

plot n number of nodes, where the color of each node depends on some value eg. energy, using MATLAB

Use griddata

plot n number of nodes, where the color of each node depends on some value eg. energy, using MATLAB

Use griddata

2 months ago | 0

Answered

Surface generation with an external impact at particular point

See this [t,r] = meshgrid(0:10:360,0:0.2:5); [x,y] = pol2cart(t*pi/180,r); z = -90*x.^2.*y.^2; % remember about dot (.*) ...

Surface generation with an external impact at particular point

See this [t,r] = meshgrid(0:10:360,0:0.2:5); [x,y] = pol2cart(t*pi/180,r); z = -90*x.^2.*y.^2; % remember about dot (.*) ...

2 months ago | 0

Answered

Extracting information from 3D model - .stl file management on matlab

Try this link: Surface Curvature Can you just analyze edge length to find minimum/maximum distances?

Extracting information from 3D model - .stl file management on matlab

Try this link: Surface Curvature Can you just analyze edge length to find minimum/maximum distances?

2 months ago | 0

| accepted

Answered

how can i use one equation output values in another equation input

Try meshgrid [x,y] = meshgrid(freq,itime); plot(x,y)

how can i use one equation output values in another equation input

Try meshgrid [x,y] = meshgrid(freq,itime); plot(x,y)

2 months ago | 0

Answered

How to find a common area between three graphs in same plot

Do you have polyxpoly? Try intersections if not

How to find a common area between three graphs in same plot

Do you have polyxpoly? Try intersections if not

2 months ago | 0

Answered

How to create an animation between 3 points

See this example x = 0:10; y = sin(x); for i = 1:lengh(x) plot(x(1:i),y(1:i)) pause(0.2) end

How to create an animation between 3 points

See this example x = 0:10; y = sin(x); for i = 1:lengh(x) plot(x(1:i),y(1:i)) pause(0.2) end

2 months ago | 0

Answered

Surface generation for material removal after impact of tool

See ths example clc,clear [t,r] = meshgrid(0:10:360,0:0.2:5); [x,y] = pol2cart(t*pi/180,r); z = sin(r)./r; z0 = 1; ...

Surface generation for material removal after impact of tool

See ths example clc,clear [t,r] = meshgrid(0:10:360,0:0.2:5); [x,y] = pol2cart(t*pi/180,r); z = sin(r)./r; z0 = 1; ...

2 months ago | 0

| accepted

Answered

Making a video out of still images without using a avi file.

Try GIF animation

Making a video out of still images without using a avi file.

Try GIF animation

2 months ago | 0

| accepted

Answered

Multiple plots taking different elements of X & Y matrices in a systematic pattern

Try reshape x = linspace(0,10,40); y = sin(x); x1 = reshape(x,[4 10]); y1 = reshape(y,[4 10]); plot(x1,y1)

Multiple plots taking different elements of X & Y matrices in a systematic pattern

Try reshape x = linspace(0,10,40); y = sin(x); x1 = reshape(x,[4 10]); y1 = reshape(y,[4 10]); plot(x1,y1)

2 months ago | 0

| accepted

Answered

Distorted (Crayon-like) Graph Colour

Try linesmoothing clc,clear x = 0:10; y = sin(x); plot(x,y,'linesmoothing','on') more information: LINK

Distorted (Crayon-like) Graph Colour

Try linesmoothing clc,clear x = 0:10; y = sin(x); plot(x,y,'linesmoothing','on') more information: LINK

2 months ago | 0

Answered

Use a different colormap scale for different sections of a matrix

YOu can create your own color matrix [x,y,z] = peaks(30); ix = x.^2 + y.^2 < 2^2; c1 = z*0; c2 = z*0; c1(ix) = 1; c2(~ix) ...

Use a different colormap scale for different sections of a matrix

YOu can create your own color matrix [x,y,z] = peaks(30); ix = x.^2 + y.^2 < 2^2; c1 = z*0; c2 = z*0; c1(ix) = 1; c2(~ix) ...

4 months ago | 0

Answered

Medial axis extraction from a .STL file

An example [x,y,z] = cylinder(10); h = surf(x,y,z); p = surf2patch(h,'triangle'); p.facecolor = 'red'; stlwrite('test',p) ...

Medial axis extraction from a .STL file

An example [x,y,z] = cylinder(10); h = surf(x,y,z); p = surf2patch(h,'triangle'); p.facecolor = 'red'; stlwrite('test',p) ...

4 months ago | 0

Answered

Solving Population Balance Equation for multiple initial particle dimensions

First of all - timespan 0:1.2 is just [0 1] L=[1.2]; % Pipe Length ranges (m) [Z,N]=ode15s(...

Solving Population Balance Equation for multiple initial particle dimensions

First of all - timespan 0:1.2 is just [0 1] L=[1.2]; % Pipe Length ranges (m) [Z,N]=ode15s(...

4 months ago | 1

Answered

how to add titles row wise in the montage ?

What about text function? load mri montage(D, map) text(500,25,'TITLE 1','fontsize',30,'color','yellow','fontweight','bold') ...

how to add titles row wise in the montage ?

What about text function? load mri montage(D, map) text(500,25,'TITLE 1','fontsize',30,'color','yellow','fontweight','bold') ...

4 months ago | 1

| accepted

Answered

Plot in 300 or 600 dpi

Use print x = 0:10; y = sin(x); plot(x,y); print('test','-dpng','-r300')

Plot in 300 or 600 dpi

Use print x = 0:10; y = sin(x); plot(x,y); print('test','-dpng','-r300')

4 months ago | 1

| accepted

Answered

Plotting dates on the x-axis

Just use datenum a = rand(5,4,3); datenum(a(:,1),a(:,2),a(:,3)) Use sort if needed

Plotting dates on the x-axis

Just use datenum a = rand(5,4,3); datenum(a(:,1),a(:,2),a(:,3)) Use sort if needed

4 months ago | 0

Answered

Solve an equation, for a variable, with prompts?

What about this? function main a = myprompt('Please enter a:'); b = myprompt('the same way b:'); function y = myprompt(s...

Solve an equation, for a variable, with prompts?

What about this? function main a = myprompt('Please enter a:'); b = myprompt('the same way b:'); function y = myprompt(s...

4 months ago | 0

Answered

Looping of more than one first order equations in in function file that can be updated for different value variable parameter

See this example f = @(t,x,a) [x(2); x(1)-a*sin(x(1))]; a = rand(10,1); % parameter cmap = jet(10); for i = 1:length(a)...

Looping of more than one first order equations in in function file that can be updated for different value variable parameter

See this example f = @(t,x,a) [x(2); x(1)-a*sin(x(1))]; a = rand(10,1); % parameter cmap = jet(10); for i = 1:length(a)...

4 months ago | 0

| accepted