Answered
Better “centerpoint” than centroid of a concave polygon
Here is the simplest solution for this task x = rand(4,1); y = rand(4,1); x = [x; x(1)]; y = [y; y(1)]; ii = 2; % corne...

6 years ago | 0

| accepted

Answered
readmatrix produces NaN values after parsing a .txt file
See this solution I don't have readmatrix. I tried importdata A = importdata('matrixA.txt'); data = A.data; find( isnan(data...

6 years ago | 3

| accepted

Answered
Solve Finite Element Analysis equation
Here are some of my thoughts

6 years ago | 1

| accepted

Answered
Solve set of inequalities
Here is what i invented clc,clear cla A = -203; B = 12189; DAC05 = 206; DAC45 = 1864; gamma = 2; c0 = linspace(-1e3,1e...

6 years ago | 1

Answered
Plotting Solution for Different Times: Hyperbolic PDE
I used this difference scheme results Do you have a picture of expected result?

6 years ago | 0

Answered
Draw triangle on 3d mesh
What about this? function main opengl software h = surf(sphere(20)); axis vis3d set([h gcf],'hittest','off') % не зн...

6 years ago | 0

Answered
how to fix the brightness of a series of 3d isosurface images
It's cause by these Example [x,y,z,v] = flow; isosurface(x,y,z,v,-3); isosurface(x,y,z,v,-1); caxis([-4 0]) view(3) axi...

6 years ago | 0

Answered
finding coordinate based on distances
Here is an idea Red numbers are distances as following Black numbers are number of points Tell me what do you think

6 years ago | 1

Answered
Split Volume Along 2D Surface
See this madness clc,clear [x1,y1,z1] = meshgrid(1:10); % volume boundaries [x2,y2] = meshgrid(1:0.5:10); % su...

6 years ago | 1

Answered
Collecting and rearranging excel data
Try this clc,clear A = [] [s1,info1] = xlsfinfo('Season 2017.xls'); for i = 1:numel(info1) A1 = readtable('Season 201...

6 years ago | 0

Answered
Generate a mesh with unequal steps based on a density function
What about this? x = (0:.02:2)'; y = 5*sin(2*pi*x).*x; t = [0; cumsum(hypot(diff(x),diff(y)))]; t1 = linspace(t(1),t(end))...

6 years ago | 0

Answered
First time using imagesc and it seems to be completely changing my plot? Help!
You Fxy matrix should be 2D. No for loop is needed [x,y] = pol2cart(angle,radius); [Fxy,~] = mehsgrid(F,radius); imagesc(x,y,...

6 years ago | 0

Answered
Why is ODE15s ignoring my boundary conditions?
I rewrote your equations as following I used this difference scheme And here is the success i reached

6 years ago | 0

Answered
How to link subgroup data points together in a plot?
What about this? hold on A1 = unique(A(:,1)); cmark = {'o' '*' '.'}; for i = 1:numel(A1) ix = A(:,1)==A1(i); h(i) ...

6 years ago | 0

| accepted

Answered
Finding maximum axial slice location from 3D binary label
Use find to find all values Use ind2sub to convert indices to i,j,k (x,y,z) ix = find(V(:)); % find nonzero...

6 years ago | 1

Answered
How to add Joint PDF Density Contour?
What about this witty trick? load seamount n = 20; x1 = (x-min(x))/(max(x)-min(x))*(n-1)+1; y1 = (y-min(y))/(max(y)-min(y)...

6 years ago | 0

Answered
Optimise creation of matern 3/2 covariance matrix
Try this [X,Y] = meshgrid(1:n); K = (1+sqrt(3)*abs(X-Y)/tau).*exp(-sqrt(3)*abs(X-Y)/tau); K = (K>1e-9).*K; read this

6 years ago | 0

Answered
Text in front of the mesh in 3D figure plot
What about this? clc,clear x = rand(1,100); y = rand(1,100); z = rand(1,100); x0 = mean(x); y0 = mean(y); x1 = x-x0; y...

6 years ago | 0

Answered
finding dense location and define centeriod of the each dense location
Here is simple but coarse (maybe not precise method) Fill matrix Connect pixels Thin l...

6 years ago | 0

| accepted

Answered
High Performance Interpolation of 3D grid data
Here is an example. It's just a surface in 3D. I rotated X and Y and found new Z See script and try to calculate value of point...

6 years ago | 0

Answered
projectile motion in matlab
See this clc,clear a = 60; v = 10; x = 0; y = 0; vx = v*cosd(a); vy = v*sind(a); g = 9.81; dt = 0.02; % plot([5 5],[...

6 years ago | 0

Answered
split matrix into multiple matrices with variable number of rows according to value of a column
Here is how i see the solution S = importdata('Bspectrumgloei.xlsx'); A = S.data; ind = [ 20 54 78 98 132 ]; A1 = cell(5,1);...

6 years ago | 0

Answered
Intercept of two polynomial of degree 2 graphs
Try this (not tested)

6 years ago | 0

Answered
Plot the graphs of the following parametric equations using ezplot
See this madness syms r t r = sin(t/2); x = r*cos(t); y = r*sin(t); ezplot(x,y,[0 2*pi])

6 years ago | 0

Answered
How to use the mean colour of each segment of an image and display it in segmentation
Can you label each region maybe with bwlabel? Then you can just loop through each region % let 'I' be your color image [L,n] ...

6 years ago | 1

| accepted

Answered
find() returns content of {1×0 double} cell array
What about simple for loops? ffile = {'\\path\143' '\\path\204' '\\path\450'}; RAW = {'450' '143'}; allind = zeros(size(RAW)...

6 years ago | 1

| accepted

Answered
How to get the position of nodes (x and y coordinates) stored in a logical array?
You can use get if it's a handler (variable that represent an object (plot or somerthing)) CPP is array of logical type CPP(r,...

6 years ago | 0

| accepted

Answered
How to plot a curve using angles?
Try cumsum ds = rand(1,10); % length of each segment a = rand(1,10)*90; % angle of each segment dx = sind(a).*d...

6 years ago | 1

| accepted

Answered
using shooting method for coupled ode
Thank you more readable code Here are some mistakes Some note: Shouldn't last equations be like this? What is g? Ther...

6 years ago | 1

Load more