https://sites.google.com/site/kolukulasivasrinivas/

Professional Interests: Mathematical Computing

Answered

Repalce zero element by the number before it ?

N=[ 0 1 4 5 6 7 0 10 0 0 0] ; M = N ; idx = find(N==0) ; % get the indices of zeros...

Repalce zero element by the number before it ?

N=[ 0 1 4 5 6 7 0 10 0 0 0] ; M = N ; idx = find(N==0) ; % get the indices of zeros...

약 15시간 ago | 1

Answered

Plot a function of three variable

f = @(x,y,z) x.^2+y.^2+z.^2-3*x.*y.*z ; x = linspace(-1,1) ; y = linspace(-1,1) ; z = linspace(-1,1) ; [X,Y,Z] = ndgrid(x,y,...

Plot a function of three variable

f = @(x,y,z) x.^2+y.^2+z.^2-3*x.*y.*z ; x = linspace(-1,1) ; y = linspace(-1,1) ; z = linspace(-1,1) ; [X,Y,Z] = ndgrid(x,y,...

1일 ago | 0

Answered

How do I bind a specific value to a color using colormap?

Refer this link for the same: https://in.mathworks.com/matlabcentral/answers/375166-how-to-customize-a-colorbar-of-contourf-plo...

How do I bind a specific value to a color using colormap?

Refer this link for the same: https://in.mathworks.com/matlabcentral/answers/375166-how-to-customize-a-colorbar-of-contourf-plo...

2일 ago | 0

Answered

Edit data labels without regenerating plot

x = 0:pi/36:2*pi; y = sin(x); plot(x,y) T = gobjects(8,1) ; for i = 1:8 textstr = sprintf('P%g',i); T(i) = text(i/...

Edit data labels without regenerating plot

x = 0:pi/36:2*pi; y = sin(x); plot(x,y) T = gobjects(8,1) ; for i = 1:8 textstr = sprintf('P%g',i); T(i) = text(i/...

2일 ago | 0

Answered

how to extract a number from file name in folder

Read about dir . This will give you all the file spresent int he foder. YOu can give extension and extract only those files.

how to extract a number from file name in folder

Read about dir . This will give you all the file spresent int he foder. YOu can give extension and extract only those files.

2일 ago | 0

Answered

How can I calculate the area between two wawe lines of two agents?

Read about polyarea, trapz

How can I calculate the area between two wawe lines of two agents?

Read about polyarea, trapz

2일 ago | 0

Answered

Cell array: select cells based on length

C = cell(5,1) ; C{1} = rand(1,3) ; C{2} = rand(1,3) ; C{3} = rand(4,3) ; C{4} = rand(1,3) ; C{5} = rand(4,3) ; row = cel...

Cell array: select cells based on length

C = cell(5,1) ; C{1} = rand(1,3) ; C{2} = rand(1,3) ; C{3} = rand(4,3) ; C{4} = rand(1,3) ; C{5} = rand(4,3) ; row = cel...

2일 ago | 0

| accepted

Answered

Cannot get .tif image to display. Following are image info

YOu should use fread to read the data. Read about fread. Also have a look on Tiff https://in.mathworks.com/help/matlab/ref/tiff...

Cannot get .tif image to display. Following are image info

YOu should use fread to read the data. Read about fread. Also have a look on Tiff https://in.mathworks.com/help/matlab/ref/tiff...

3일 ago | 0

| accepted

Answered

remove weekends and holidays data from excel file

% Read data T1 = readtable('ABC.xlsx','sheet',1) ; T2 = readtable('ABC.xlsx','sheet',2) ; % Get dates common in both idx =...

remove weekends and holidays data from excel file

% Read data T1 = readtable('ABC.xlsx','sheet',1) ; T2 = readtable('ABC.xlsx','sheet',2) ; % Get dates common in both idx =...

3일 ago | 0

| accepted

Answered

How to detect clear bubbles

I = imread('download.jpg') ; R = I(:,:,1) ; G = I(:,:,2) ; B = I(:,:,3) ; [y,x] = find(R==255) ; imshow(I) hold on pl...

How to detect clear bubbles

I = imread('download.jpg') ; R = I(:,:,1) ; G = I(:,:,2) ; B = I(:,:,3) ; [y,x] = find(R==255) ; imshow(I) hold on pl...

3일 ago | 0

Answered

What next in the code

The error clearly says that you don;t have the function/ code named Naturalfreq.m . You have to donwload and save it and use.

What next in the code

The error clearly says that you don;t have the function/ code named Naturalfreq.m . You have to donwload and save it and use.

3일 ago | 1

| accepted

Answered

I have a 3D matrix having dimension m*n*365 (where m & n represents the the number lat & lon grids;365 represents the daily rainfall data stored in each grids). How can I find the percentile value of rainfall data stored in 150th day for each grid?

Let A be your m*n*365 3D matrix. Extract 150th matrix out of it. B = A(:,:,150) ; YOu can carry on your computation on B. ...

I have a 3D matrix having dimension m*n*365 (where m & n represents the the number lat & lon grids;365 represents the daily rainfall data stored in each grids). How can I find the percentile value of rainfall data stored in 150th day for each grid?

Let A be your m*n*365 3D matrix. Extract 150th matrix out of it. B = A(:,:,150) ; YOu can carry on your computation on B. ...

3일 ago | 0

Answered

Image is too big to fit on screen; displaying at 13%? How to fix it

Turn off the warning.... warning('off', 'Images:initSize:adjustingMag');

Image is too big to fit on screen; displaying at 13%? How to fix it

Turn off the warning.... warning('off', 'Images:initSize:adjustingMag');

3일 ago | 0

| accepted

Answered

how to plot rectangles from csv data

A = [1 31 4 9 12 56 17 12 47 43 56 45 43 25 50 14] ; R = 1 ; th = linspace(0,2*pi) ; x = R*cos(th) ; y = R*sin(th) ...

how to plot rectangles from csv data

A = [1 31 4 9 12 56 17 12 47 43 56 45 43 25 50 14] ; R = 1 ; th = linspace(0,2*pi) ; x = R*cos(th) ; y = R*sin(th) ...

3일 ago | 0

| accepted

Answered

How to automate selecting specific xyz map data from an existing xyz data set?

Read about inpolygon. If you have the vertices of closed region/ polygon; ou can get the points lying inside the region.

How to automate selecting specific xyz map data from an existing xyz data set?

Read about inpolygon. If you have the vertices of closed region/ polygon; ou can get the points lying inside the region.

3일 ago | 0

Answered

How to create a circles (smallest and biggest circle) based on points in an image given, then find the center and radius?

YOu can try to fit a circle with the coordinates (x,y) you have. Check the below code: function [xc,yc,R,a] = circfit(x,y) ...

How to create a circles (smallest and biggest circle) based on points in an image given, then find the center and radius?

YOu can try to fit a circle with the coordinates (x,y) you have. Check the below code: function [xc,yc,R,a] = circfit(x,y) ...

3일 ago | 0

Answered

How to fill matrix in for loop?

z=-1:0.001:0; ri=0.7; R=ri-z*(ri-1); [R,Z] = meshgrid(z,R) ; r = R-Z.*(R-1) ;

How to fill matrix in for loop?

z=-1:0.001:0; ri=0.7; R=ri-z*(ri-1); [R,Z] = meshgrid(z,R) ; r = R-Z.*(R-1) ;

6일 ago | 1

Answered

Read multiple csv files from a folder and not all csv files

fid = fopen('myfile.txt','rt') ; % open your text pad file S = textscan(fid,'%s','delimiter','\n') ; S = S{1} ; ...

Read multiple csv files from a folder and not all csv files

fid = fopen('myfile.txt','rt') ; % open your text pad file S = textscan(fid,'%s','delimiter','\n') ; S = S{1} ; ...

7일 ago | 0

Answered

Vectors must be the same length error

YOu need to rethink on your code. bny = input('Insira o codigo binario a codificar: ' ,'s'); idx = ismember(bny,'01'); assert...

Vectors must be the same length error

YOu need to rethink on your code. bny = input('Insira o codigo binario a codificar: ' ,'s'); idx = ismember(bny,'01'); assert...

8일 ago | 0

Answered

find the index of Curve intersections

Use knnsearch. This will give you the exact point if exists...or the nearest point to the intersection.....

find the index of Curve intersections

Use knnsearch. This will give you the exact point if exists...or the nearest point to the intersection.....

8일 ago | 0

Answered

How to open a .p file in matlab ?

You cannot open a .p file...you can only use it......

How to open a .p file in matlab ?

You cannot open a .p file...you can only use it......

8일 ago | 0

Answered

Parfor loop with 3D structure matrix

No loops and parfor required...have a look on reshape. A = rand(4697,1,1600) ; nx = 77 ; ny = 61 ; nt = 1600 ; B = resh...

Parfor loop with 3D structure matrix

No loops and parfor required...have a look on reshape. A = rand(4697,1,1600) ; nx = 77 ; ny = 61 ; nt = 1600 ; B = resh...

8일 ago | 0

Answered

How to import 3GB netcdf file into matlab

YOu are trying to load the enitre data from netCDF into MATLAB..this is not the right option..first get familiar with the data.....

How to import 3GB netcdf file into matlab

YOu are trying to load the enitre data from netCDF into MATLAB..this is not the right option..first get familiar with the data.....

8일 ago | 0

| accepted

Answered

getting all points over a specific part in matlab plot

Read about scatteredInterpolant .....this will help you to get what you want. Let (xi,yi) be the x,y, coordinates of the red...

getting all points over a specific part in matlab plot

Read about scatteredInterpolant .....this will help you to get what you want. Let (xi,yi) be the x,y, coordinates of the red...

8일 ago | 0

Answered

Access to a reference

YOu can go to this link https://www.researchgate.net/publication/268314294_Solving_0Ftyty_'_t_in_Matlab and request for a full c...

Access to a reference

YOu can go to this link https://www.researchgate.net/publication/268314294_Solving_0Ftyty_'_t_in_Matlab and request for a full c...

8일 ago | 0

Answered

Plotting latitude, longitude,and signal strength

Read about pcolor, surf, scatter, conourf. All these can be used to plot what you want. The below link shows the possible plot...

Plotting latitude, longitude,and signal strength

Read about pcolor, surf, scatter, conourf. All these can be used to plot what you want. The below link shows the possible plot...

9일 ago | 0

| accepted

Answered

How to extract data with latitude and longitude?

Read about interp2. This will help you to get the required data. Let X,Y, A be your whole globe lat,lon and respective data....

How to extract data with latitude and longitude?

Read about interp2. This will help you to get the required data. Let X,Y, A be your whole globe lat,lon and respective data....

9일 ago | 0

Answered

how to average column 3 when column 1 and column 2 satisfies some condition in matrix

A = [1 2 22 1 2 12 1 3 0 1 3 4 2 2 6 2 2 0 2 3 2 2 3 2]; [c,ia,ib...

how to average column 3 when column 1 and column 2 satisfies some condition in matrix

A = [1 2 22 1 2 12 1 3 0 1 3 4 2 2 6 2 2 0 2 3 2 2 3 2]; [c,ia,ib...

9일 ago | 1