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

Professional Interests: Mathematical Computing

Answered

what is the best fit for a set of data?

Refer this: https://in.mathworks.com/matlabcentral/answers/409493-how-to-fit-a-custom-equation

what is the best fit for a set of data?

Refer this: https://in.mathworks.com/matlabcentral/answers/409493-how-to-fit-a-custom-equation

5 hours ago | 0

Answered

How do I use a while loop to keep asking for input of even numbers?

prompt = 'Enter a number:'; S = input(prompt) ; if mod(S,2) S = input(prompt) ; end

How do I use a while loop to keep asking for input of even numbers?

prompt = 'Enter a number:'; S = input(prompt) ; if mod(S,2) S = input(prompt) ; end

7 hours ago | 0

Answered

Multiplying Certain Elements in an array- Construct a matrix, s3, by multiplying the first 10 elements of s by 3

s = 0:100 ; s3 = s(1:10)*3 ; Read about MATLB matrix indexing. https://in.mathworks.com/company/newsletters/articles/matrix-in...

Multiplying Certain Elements in an array- Construct a matrix, s3, by multiplying the first 10 elements of s by 3

s = 0:100 ; s3 = s(1:10)*3 ; Read about MATLB matrix indexing. https://in.mathworks.com/company/newsletters/articles/matrix-in...

7 hours ago | 1

| accepted

Answered

How to find entropy of an image?

https://in.mathworks.com/matlabcentral/fileexchange/28692-entropy

How to find entropy of an image?

https://in.mathworks.com/matlabcentral/fileexchange/28692-entropy

7 hours ago | 0

Answered

2d Coordinate rotation in clockwise direction

th = pi/4 ; R = [cos(th) -sin(th) ;sin(th) cos(th)] ; Multiply your points with the above R. Read about rotation matrix: https...

2d Coordinate rotation in clockwise direction

th = pi/4 ; R = [cos(th) -sin(th) ;sin(th) cos(th)] ; Multiply your points with the above R. Read about rotation matrix: https...

8 hours ago | 0

| accepted

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...

1 day 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,...

2 days 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...

3 days 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/...

3 days 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.

3 days 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

3 days 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...

3 days 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 days 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 days 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 days 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 days 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 days 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 days 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 days 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 days 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 days 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) ;

7 days 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} ; ...

8 days 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 days 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 days 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 days 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 days 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.....

9 days ago | 0

| accepted