Answered
The distance of a point from a set
Read about pdist, pdist2

9 days ago | 0

Answered
Interpolating with 3 variables
REad about griddata. scatteredInterpolant. If not attach your data.

9 days ago | 0

| accepted

Answered
how to make a patch on geoplot?
x = [126.509 126.508 126.511 126.512] ; y = [37.403 37.4063 37.4048 37.4081] ; patch(x,y,'r') In case, you looking for: [val...

9 days ago | 0

Answered
Find Intersection between curves
This should not dissappoint you. https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections

9 days ago | 0

Answered
How to plot two parameter bifurcation diagram
One of the option: https://in.mathworks.com/matlabcentral/fileexchange/35355-stability-chart

9 days ago | 0

Answered
change histogram to PDF
x = randn(10000,1) ; histogram(x) pd = fitdist(x,'kernel'); x_values = min(x):0.01:max(x) ; y_values = pdf(pd,x_values);...

9 days ago | 0

Answered
plot using user custumized legend lines
K = [100;200;400;600;800;1000;1200;1400;1600;1800;2000]; a = 1; B=0.2; r = radius_cal (K,B) ; c = {'r','g','b','c','m','y'...

9 days ago | 1

Answered
Plotting Inequalities in Matlab
x = -10:0.1:10 ; y = -10:0.1:10 ; [X,Y] = meshgrid(x,y); ineq = (X > 0) & (Y > 5./X) & (Y > (X.^(2)-25)./(5*X)); h = pcolo...

9 days ago | 0

| accepted

Answered
a single line of code that will take complex variables x and y and define a variable z as the phase of the product of x and y.
x = rand+1i*rand ; y = rand+1i*rand ; p = x*y ; iwant = atan(imag(p)/real(p))

9 days ago | 0

Answered
How to plot surf for 3D images.
dicom will be a 3D matrix..you cannot use surf straight away. h = dicomread('h.dcm'); [m,n,p] = size(h) ; figure hold on f...

10 days ago | 0

| accepted

Answered
How to shift the graph?
Read about montage

10 days ago | 0

Answered
How to adjust plot?
Don't use: plot(t(45/dt:end),V(45/dt:end-1), 'LineWidth', 2) instead use: plot(t,V, 'LineWidth', 2) Like this: clear all; c...

10 days ago | 0

| accepted

Answered
How to draw three circles with centers and radii given?
x1=2; y1=8; r1=10; x2=5; y2=5; r2=12; x3=4; y3=9; r3=9; th = linspace(0,2*pi) ; x = cos(th) ; y = sin(th) ; figure ...

10 days ago | 0

Answered
How to convert cell to logical?
You can use ismember. Let L be your categorical data of size 128*128*64. I see that, there are two data background, tumour. You ...

10 days ago | 0

| accepted

Answered
Divide training , validation and testing data.
A = rand(2000,3) ; % your data Test = A(1501:end,:) ; % take test continuously A = A(1:1500,:) ; % pick the left dat...

10 days ago | 1

| accepted

Answered
How do I limit plotting the values from a row variable say time?
Z = peaks(30) ; x = datetime(2022,01,01):datetime(2022,01,30) ; % datetime class y = 1:30 ; pcolor(x,y,Z) shading flat

10 days ago | 0

Answered
Why do certain images require imshow(imagename,[]). whereas others don't?
You check the class of A, B. A=imread('cameraman.tif'); PSF = fspecial('gaussian',[5,5],2); h=fspecial('motion', 10, 45); B...

10 days ago | 1

Answered
Split .nc file into multiple .nc files
@anjula marasinghe, @Jake_K There is no necessity to split the single ncfile into multiple ncfiles for each time step. It is wa...

11 days ago | 0

Answered
How can I recode certain values in one vector based on those in another?
Vector1 = [29, 59, 94, 133, 169, 207, 243, 281, 317, 356, 392, 431, 469, 505, 543]'; Vector2 = [44, 74, 120, 148, 184, 227, 269...

13 days ago | 0

| accepted

Answered
Different colors in Histogram (MATLAB)
Iter=[30 55 64 130 186 432]; SNR=[9 8 8 9.3 6 6.7]; color = {'r','b','g','y','m','k'} ; figure hold on for i = 1:length(It...

14 days ago | 1

| accepted

Answered
How to define two dimension longitude, latitude and variable for saving data in netcdf format?
lon=rand(406,271); lat=rand(406,271); var=rand(406,271); [nx,ny] = size(lon) ; % nc filename to be written file = 'myfile....

14 days ago | 0

Answered
Ho to find the interception
The best you can use is: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections

14 days ago | 1

Answered
how to make colormap and color bar from ansys to like out in matlab
Try the below after pcolor. cmap = jet(10) ; colormap(cmap) caxis([85 100]) % mention your limits

14 days ago | 0

Answered
Reduce edgewidth in trisurf plot
x = rand(100,1) ; y = rand(100,1) ; dt = delaunayTriangulation(x,y) ; t = dt.ConnectivityList ; p = dt.Points ; d = sqr...

14 days ago | 0

| accepted

Answered
Delete rows in a string array, if they just contain zeros
I hope, your data is in a file. T = readtable(myfile) ; T(T.(2)==0,:) = [] ;

14 days ago | 0

Answered
how to remove values below 0.1?
If P is your array if size 1x27331. P(P<0.1) = NaN ;

14 days ago | 0

| accepted

Answered
comma insertion in array
A = [1 2 3] ; dlmwrite('test.txt',A)

14 days ago | 0

Answered
How to fill polygons based on attribute values?
How about this? shpFile = 'Expot.shp' ; S = shaperead(shpFile) ; N = length(S) ; cmap = jet(N) ; figure hold on for...

14 days ago | 0

| accepted

Load more