Answered
How to write xyz files
Let A(x,y,z) be your m*3 array. fid = fopen('test.txt') ; fprintf(fid,'%f %f %f\n', A') ; fclose(fid) ;

7 years ago | 0

Answered
How to tabulate the values?
I=[-40 -30 -20 -10 0 10 20 30 40]; w=[0.035 0.5 1 1.25 1.5]; h=1.57; I_len=length(I); w_len=length(w); T = zeros(w_len,I_...

7 years ago | 0

| accepted

Answered
How to plot Heat in 3D cartesian plane.
Let (x,y,z) be your data. m = 100; n = 100 ; xi = linspace(min(x),max(x),m) ; yi = linspace(min(y),max(y),n) ; [X,Y] = ...

7 years ago | 1

Answered
how to merge multi netcdf files in single
REad the first file for lat, lon , data dimensions. Run a loop for each file. Read data using ncread inside loop for every f...

7 years ago | 0

Answered
How to get rid of gaps in my structure?
S = struct ; for i = 1:2:10 S(i).val = rand(10,1) ; end % GEt the empty structures idx = find(arrayfun(@(S) isempty(...

7 years ago | 0

| accepted

Answered
Find the intersection of a square pixel with a closed 2D curve
Use this file exchange: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138&tab=func...

7 years ago | 0

Answered
Getting a variable and its value from a csv file
T = readtable(file) ; T.var % where var is your variable name

7 years ago | 1

Answered
How to fill wing movement in 3d?
This is what you are looking for? load 'wingtip.mat' t = AA(:,1:3) ; wing = AA(:,4:6) ; patch(t(:,1),t(:,2),t(:,3))

7 years ago | 0

Answered
How to generate animated gif?
Read this to know how to write plots to a gif. https://in.mathworks.com/matlabcentral/answers/94495-how-can-i-create-animate...

7 years ago | 0

Answered
Interpolation of a scatter plot
Read about interp2, griddata. If not working attach your data.

7 years ago | 0

Answered
How to apply the laplacian filter on a color image in Matlab?
https://in.mathworks.com/help/images/ref/locallapfilt.html

7 years ago | 0

| accepted

Answered
How can I compute spectrogram for data vector containing NaN values?
Multiple options: Discard NaN's Fill the NaN's using interpolation (interp1, spline) Fill the NaN's using fillmissing Fill t...

7 years ago | 0

| accepted

Answered
How to measure the similarity between two signal?
Read about xcorr

7 years ago | 0

Answered
How to select points on a scattered plot with mouse?
Read about ginput

7 years ago | 0

| accepted

Answered
Linear indices from row and column indices for a rectangular region of interest.
YOu need to consider the size of matrix a. %this works a = rand(5,5); row_indices = 1:5; col_indices = 1:5; [X,Y] = meshgr...

7 years ago | 0

Answered
how to plot random points in airfoil wing
Check this demo example. I have coded it keeping in mind how your data is. It is like you are provided with upper and lower curv...

7 years ago | 0

| accepted

Answered
3d plot help
data=[1,1,1 ; 2,2,2 ; 3,3,3; 4,4,4] x=data(:,1); y=data(:,2); z=data(:,3); figure scatter3(x,y,z,100,z,'filled')

7 years ago | 0

| accepted

Answered
filter a matix column values
Let X,Y,D,V be your (x,y) locations, distance and velocity respectively. figure hold on plot(X,Y,'r') plot(X(D>1.5),Y(D>1...

7 years ago | 1

| accepted

Answered
Select 100 points either side from mouse click cooradinates
x = linspace(0,1) ; y = sqrt(x) ; % Mid point M = [mean(x) mean(y)] ; % points left side idx1 = x<M(1) ; % % points...

7 years ago | 0

Answered
find missing points on a graph
a=[1,3,4,6,7,9] b=[2,12,24,32,41,49] plot(a,b,'r-') hold on plot(a,b,'ko','LineWidth',2,'DisplayName','KnownCorrespondence')...

7 years ago | 0

| accepted

Answered
How to eliminate certain columns from a matrix
Let A be matrix A(:,1:2:end) = [] % remove odd columns A(:,3) = [] % remove third column idx = [1 2 5 7] ; A(:,i...

7 years ago | 2

| accepted

Answered
Matlab coding and workspace
A = zeros(100,1) ; % initilaize for i = 1:100 A(i) = rand ; % update the value in loop end

7 years ago | 0

Answered
How can I draw separating lines between colors in a 3D volume plot?
Remove the shading interp line after plotting. LV_S3_LAT; %load the data V = Vertices(:,2:4); T = Triangles(:,2:4)+1; sV ...

7 years ago | 0

Answered
How to remove small connected parts in the image without smoothing the others?
Read the image Get the locations of black pixels Fit the ellipse for the data Plot the ellipse on the image Use inpolygon a...

7 years ago | 0

Answered
RGB map into numerical data
I = imread('IMG_2830.jpeg') ; I1 = imcrop(I) ; % Exactly crop the required borders/ exclude axis [nx,ny] = size(I1) ; x ...

7 years ago | 0

| accepted

Answered
How to use result in each iteration in a for loop and then use it in next loop?
for i = 1:10 a = rand+rand ; % this is the result in first loop for j = 1:3 b = a+rand ; % result of first...

7 years ago | 0

Answered
Filling in matrix for strain map
Read about fillgaps and fillmissing

7 years ago | 0

| accepted

Answered
Surface Plot Excel Data
num = xlsread(myfile) ; x = num(:,1) ; y = num(1,:) ; Z = num(2:end,2:end) ; surf(x,y,Z) % if throws error trnspose Z

7 years ago | 3

Answered
How to check a triangle surface mesh is closed?
Just a wild guess.......give a try and let me know. Find the mean of the points and check whether this mean lies inside or outsi...

7 years ago | 0

| accepted

Answered
Display radius on the plot
YOu can display radius of the circle like below: th = linspace(0,2*pi) ; R = 1. ; % REadius of Circle C = [0. 0.] ; ...

7 years ago | 0

Load more