Answered
ode45 for DQ
See this solution

12 dagar ago | 0

Answered
Why does probabililty distribution for 3D matrix not work with NaN values?
Try this way %% 2) calculate critical probability (lambda) for each grid point lambda_x_neg= zeros(size(U_stat,1),size(U_stat,...

12 dagar ago | 1

| accepted

Answered
Threshold for Subvolume of figure shown below
Let X,Y and Z be your 3d matrices ff = patch(isosurface(X,Y,Z,V,threshold)); v = ff.vertices; ...

13 dagar ago | 0

Answered
Drawing a spiraling half circle
Try polyxpoly. Here is a start clc,clear cla [x,y] = pol2cart(-pi/2:.1:pi/2,1); for i = 3:5 r = 5+i; [xc,y...

13 dagar ago | 0

| accepted

Answered
Please Help: "Error in odearguments (line 90)" and "Error in ode45 (line 115)"?
Try this modification results

13 dagar ago | 0

| accepted

Answered
Continue program after exponential fit gives inf
Use try and catch for i = 1:10 try f1 = fit(X_axis_data, curve_envelope, 'exp1'); catch ME disp('er...

13 dagar ago | 0

| accepted

Answered
Filling up the outer surface holes/gaps
HEre is a start: h = strel('disk',5); I1 = imdilate(yellow,h); % imdilate yellow part (bone) I2 = I1 & ~yellow; ...

14 dagar ago | 0

Answered
How can I plot rows from different matrices?
Use for loop for i = 1:12 for j = i+1:13 line(x(i,:),y(j,:),'color',rand(1,3)) end end

14 dagar ago | 0

| accepted

Answered
How to find a mean value after each 360 degree?
Try this A = importdata('meanvalue.csv',','); %% B = cumsum(diff(A,2,1)); B(end+1,:) = -inf; k = 1; s = 1; for i = 1:size...

14 dagar ago | 1

| accepted

Answered
Dear bosses, I want to draw the Hopf bifurcation image. Please help me, thank you. There are specific instructions below.
What about this solution? clc,clear cla for j = 0:4 beta = j; F=@(t,y) [0.5-beta*y(1)*y(2)-0.2*y(1) ...

14 dagar ago | 0

Answered
How can I find integral of a 3-D mesh field?
Volume under the surface can be found as s = 0; for i = 1:size(A,1)-1 for j = 1:size(A,2)-1 s = s + A(i:i+1,j:j+...

14 dagar ago | 0

Answered
How to plot on 2 figures generated inside a for loop without them overlapping ?
Here is an example how to switch between figures figure(1); plot([0 1],[0 1],'r') line([0 2],[0 1],'col','b') figure(2); pl...

14 dagar ago | 0

| accepted

Answered
Remove part of (fsurf) surface
Try numerical solution F = matlabFunction(pwr); [X,Y] = meshgrid(300:20:1000); Z = F(X,Y); Z1 = (Y-3/4*X)/10; % l...

15 dagar ago | 0

Answered
How to convert all vector elemens into zeros but not the maximum and the minimum of it?
Try this modification

15 dagar ago | 0

| accepted

Answered
pcolor function axes switch
use meshgrid to create X, Y and Z matrices use surf with cdata property to assign colors Example [X,Z] = meshgrid(-3:.5:3); ...

15 dagar ago | 0

Answered
Lorentz equation using the Euler method
Try this solution

15 dagar ago | 1

| accepted

Answered
How to optimize imagesc plot with pixel labels to get a faster frame grab for creating a .avi
Move every possible operations outside the for loop Some exaplanations Simple example clc,clear % create new object ...

15 dagar ago | 0

| accepted

Answered
partion of a rectangle into small rectangles with gaps
Try imdilate and meshgrid A = zeros(100); [X,Y] = meshgrid(10:20:100); A(X(:),Y(:)) = 1; A1 = imdilate(A,ones(10)); imshow(...

15 dagar ago | 0

| accepted

Answered
Code detecting false objects
Use threshold to find appropriate objects th = threshold(img); % bw = im2bw(img,th); bw = im2bw(img,th+0.1);

15 dagar ago | 0

Answered
Offsetting race track centre line data
Try the attached script. It's pretty simple. I leaved some comments so all should be clear There is a function self_inter insid...

15 dagar ago | 0

| accepted

Answered
How to create a 3D non convex surface (helical ribbon) with a set of points?
Use surf t = linspace(0,5*2*pi,100); T = [t;t]; Z = [t;t+3]/5; [X,Y] = pol2cart(T,T*0+3); surf(X,Y,Z,'edgecolor','none') l...

15 dagar ago | 0

| accepted

Answered
Resolution of a second-order differential equation for multiple variable parameters
Because your Hzdot function depends on t variable dy(2,1) = -(OmegaR^2/4)*sin(4*x(1))-2*Omegae*alpha*x(2)+gamma*Hzdot(t); Chan...

15 dagar ago | 1

| accepted

Answered
Identification of rooms in a floorplan
I skeletonized the image and found endpoints with bwmorph. Found shortest distances and connected points I0 = imread('image.jpe...

16 dagar ago | 1

| accepted

Answered
Solving a system of PDEs with non constant coefficients and dirichlet and neumann boundary conditions
If your equations change in direction only they are ODE (ordinary differential equations) Is it possible to solve this kind of...

16 dagar ago | 0

| accepted

Answered
How do I cut a surface in Matlab plot?
Do you have a contour? Green line? [x,y,z] = peaks(20); % some contour data data = [-0.3907 1.5591 -1.8039 0....

16 dagar ago | 0

Answered
How to find the first value coordinate(the minimum non-zero x coordinate) in each row?
Try this a = zeros(size(A,1),1); for i = 1:length(a) a(i) = find(A(i,:),1,'first') end

16 dagar ago | 0

Answered
cropping an image using centroids
Try this A = imread('image.png'); I = im2bw(A,0.1); % binarize image [L,n] = bwlabel(I); % label image f...

17 dagar ago | 0

| accepted

Load more