Answered
How to plot error ellipses on the head of the quiver's arrows?
So my dataset is made of six coloumns: latitude, longitude, horizontal velocity, vertical velocity, horizontal uncertainty and v...

6 years ago | 0

| accepted

Answered
Trying to automatically crop an image into several smaller images based on segmentation
Something like this clc,clear I = imread('image.jpeg'); I1 = im2bw(I); I2 = imdilate(I1,ones(5)); % imdilate to close...

6 years ago | 1

| accepted

Answered
Plot with symbolic value on x axis
Use numeric values to plot Use symbolic values to make labels h = plot(x,y) syms T x1 = x*T; set(h,'Xticklabel',x1)

6 years ago | 1

Answered
alignment between thermal and color images
I usually use this simple scheme I1 = im2bw(RGB); I2 = im2bw(THERMAL); imshow(cat(3,I1*255,I2*255,I1*0))

6 years ago | 0

Answered
Selecting parts of gridded data- I Need Help. I want to know it's possible or not?
Here is my achievement clc,clear load points.mat load grid_datamat.mat p = table2array(Points); g = table2array(grid_da...

6 years ago | 1

| accepted

Answered
Unable to solve exercise using duffing equation
Where is blue part? You should use for loop to calculate for different gamma = 0.1:0.1:2; for i = 1:length(gamma) x1_...

6 years ago | 0

| accepted

Answered
Keypress to another program
What about ButtonDownFcn? function main x = linspace(0,10,50); y = sin(x); h = plot(x,y,1,1); set(gca,'buttonDownFcn',@...

6 years ago | 0

Answered
How to vectorise or speedup the code
Try pdist2 D = pdist2([Lat(:) Lon(:)],[lat(:) lon(:)]); % create every possible combinations of distances [i,j] = find(...

6 years ago | 0

| accepted

Answered
Solve ODE for the eigenvalue
I changed limits and the call of bvp4c xlow = -2; xhigh = 2; X0 =8 ; y10 = 1; y20 = 1; sol = bvp4c(@bvp4ode, @bvp4bc, soli...

6 years ago | 0

Answered
I need to save result of three loops in same file data if you possible for plot graphs or curves in 3D ?
example mass_ratio = 0.01:0.01:0.1; frequency_tuning = 0.85:0.1:1.15; damping_ratio = 0.01:0.01:0.2; displacement = zeros( l...

6 years ago | 0

Answered
Calculating area under curve with cutoff
Don't know about vectorizing. Maybe this part will be simpler and faster load v.mat v = cumsum(v); v1 = v; dv1 = v*0; for i...

6 years ago | 0

Answered
How can I plot 2 fit curves in the same plot using cftool ?
Try this in second fit

6 years ago | 0

| accepted

Answered
How in Matlab R2019b fix error in ode45 solver command in solving a dynamic system consists of multiple ODEs equations?
Mistakes Also i suggest you to re-write your equations: dxdt(1,1) = delH*N-(1-u1)*lamH*(x(6)/N)*x(1)-delH*x(1)+alfa*x(3); d...

6 years ago | 0

| accepted

Answered
How to interpolate a lat lon satellite data on regular grid
I just created new mesh [m,n] = size(V23_8); % original size [gm,gn] = size(Glat); % result size [X,Y]...

6 years ago | 0

Answered
my plot is not sinusoidal wave
Your argument for cos is too big Try x = linspace(0,5e-5,50); The result

6 years ago | 0

| accepted

Answered
How to solving and plot only one non-linear equation with two or one variables without using ezplot
Numerical way [K,F] = mehsgrid(-10:10); Z = your_function contour(K,F,Z,[0 0]) % contour at 0 level

6 years ago | 0

Answered
How to modify the code to create a Non-periodic structure
I used polyxpoly to find intersection point dc Then just scaled distance. The result: See attached script

6 years ago | 0

| accepted

Answered
Cylinder fit to a point cloud data
Here is an attempt % load data load('Data.mat'); x = REAL_data(:,1); y = REAL_data(:,2); z = REAL_data(:,3); ix = 1:10...

6 years ago | 0

Answered
Finding area of objects
Try this script I0 = imread('image.jpeg'); I1 = im2bw(I0); imshow(I1) while 1 [x,y] = ginput(1); I2 = bwselect(I...

6 years ago | 0

Answered
How to get a 3D contour plot with two matrices and a vector
Use repmat to create a matrix from vector Use plot3 to create lines % surf(x_new',T_disc,all_out); T_disc1 = repmat(T_disc(:)...

6 years ago | 1

| accepted

Answered
how to plot 3rd order differential equation in Matlab?
Where is 3d initial condition?

6 years ago | 0

Answered
Seeking help: the direction field are all vertical bars
YOu forgot the dot S = Y.*(Y-1).*(Y-2); Don't you forgot dt here? L=sqrt(1+S.^2);

6 years ago | 0

| accepted

Answered
Calculate radial displacement from X,Y,Z displacements of a cylinder node
THe solution x1 = x + x_; y1 = y + y_; dr = sqrt(x1.^2+y1.^2) - r;

6 years ago | 1

| accepted

Answered
How to use a for loop to iterate through all columns in a row, and then go down each row and iterate through all the corresponding columns in the same way?
Use repmat a = rand(531, 758); r = rand(531, 1); R = repmat(r,[1 758]) res = a./R;

6 years ago | 0

Answered
Multiple 2D in 3D Plot
If i understood you correctly: you have profile (some curve) and you want to rotate it to obtain 3D figure Here is an example ...

6 years ago | 0

| accepted

Answered
Find edges in a plot
Better solution x = path_test(:,2); y = path_test(:,1); dangle = diff( diff(y)./diff(x) ); ind = find(abs(dangle) > 0.1)+1; ...

6 years ago | 3

| accepted

Answered
To make a convex rectangular 2d patch in 3d
I tried griddata. Can't figure out why doesn't it work clc,clear,cla load('isosurface_orange.mat'); [f,v] = isosurface(xq, yq...

6 years ago | 0

| accepted

Answered
Saddle points of a 2D matrix
One way to use surfnorm clc,clear % generate some data [X,Y] = meshgrid( linspace(-1,1,20) ); Z = X.^2-Y.^2; [nx,ny,nz]...

6 years ago | 0

Answered
Solving coupled second and first order ODEs with ode45
You should use bvp4c Function for equations function dy = myode(t,y) u = y(1); eta = y(2); deta= y(3); dy(...

6 years ago | 0

Answered
Slicing a 3D vector field (defined in spherical basis and converted to cartesian basis) to view only the xz-plane of the vector field
Use griddata to create 3D matrix Use slice to create a crossection

6 years ago | 0

| accepted

Load more