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

Professional Interests: Mathematical Computing

Answered

save image without the white border

https://in.mathworks.com/matlabcentral/fileexchange/34898-remove-white-space-around-images

save image without the white border

https://in.mathworks.com/matlabcentral/fileexchange/34898-remove-white-space-around-images

11 hours ago | 0

Answered

Fast checking if array has repeated elements or not

You can simply use unique to find out whether a array has repeated elements or not. Let A be your array. if length(A)==len...

Fast checking if array has repeated elements or not

You can simply use unique to find out whether a array has repeated elements or not. Let A be your array. if length(A)==len...

14 hours ago | 0

Answered

can you help me? i want to show min and max value on RGB image with histogram, but is not work correctly?

%R Value red_min=min(R(:)) ; red_max=max(R(:)) ; %G Value green_min=min(G(:)) ; green_max=max(G(:)) ; %B Value blue_mi...

can you help me? i want to show min and max value on RGB image with histogram, but is not work correctly?

%R Value red_min=min(R(:)) ; red_max=max(R(:)) ; %G Value green_min=min(G(:)) ; green_max=max(G(:)) ; %B Value blue_mi...

21 hours ago | 0

Answered

How to plot a straight line graph that ends up with a plateau using simple hill climber method

You have to proceed something like this: sol = 0:10 ; val0 = randsample(sol,1) ; iter = 1 ; y = zeros([],1) ; x = zeros...

How to plot a straight line graph that ends up with a plateau using simple hill climber method

You have to proceed something like this: sol = 0:10 ; val0 = randsample(sol,1) ; iter = 1 ; y = zeros([],1) ; x = zeros...

22 hours ago | 0

Answered

Punto de interseccion entre una funcion cualquiera y una o varias rectas verticales

Have a look on this function: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138&tab=...

Punto de interseccion entre una funcion cualquiera y una o varias rectas verticales

Have a look on this function: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138&tab=...

22 hours ago | 1

Answered

How many times does a number appear in these lines?

Read about unique. This should help you to get what you want.

How many times does a number appear in these lines?

Read about unique. This should help you to get what you want.

1 day ago | 0

| accepted

Answered

Index of the first number divisible by 3

idx = find(mod(A,3)==0) ; iwant = idx(1)

Index of the first number divisible by 3

idx = find(mod(A,3)==0) ; iwant = idx(1)

1 day ago | 0

Answered

Converting Binary Numbers to their Decimal Equivalent

Refer this: https://in.mathworks.com/matlabcentral/fileexchange/56893-binary-float-convertor

Converting Binary Numbers to their Decimal Equivalent

Refer this: https://in.mathworks.com/matlabcentral/fileexchange/56893-binary-float-convertor

1 day ago | 0

Answered

Removing a coordinate from a list of coordinates.

Read about setdiff and ismember.

Removing a coordinate from a list of coordinates.

Read about setdiff and ismember.

1 day ago | 0

| accepted

Answered

Matrix split in vector

iwant = A(A>0) If you want in the order you have given. A = A' ; iwant = A(A>0)

Matrix split in vector

iwant = A(A>0) If you want in the order you have given. A = A' ; iwant = A(A>0)

1 day ago | 0

Answered

convert for loop to while

i = 1 ; f = 1 ; n = 3 ; while i<=n f=f*i; i = i+1 ; end

convert for loop to while

i = 1 ; f = 1 ; n = 3 ; while i<=n f=f*i; i = i+1 ; end

1 day ago | 0

| accepted

Answered

how to do a while loop to estimate pi using monte carlo method

https://in.mathworks.com/matlabcentral/fileexchange/33543-monte-carlo-method?focused=5201749&tab=function

how to do a while loop to estimate pi using monte carlo method

https://in.mathworks.com/matlabcentral/fileexchange/33543-monte-carlo-method?focused=5201749&tab=function

1 day ago | 0

Answered

Remove data from matrix

If A is your array.... You can remove data using: A(A>30) = [] ; A(A<25) = [] ; Or replace them with NaN's, if yu want same...

Remove data from matrix

If A is your array.... You can remove data using: A(A>30) = [] ; A(A<25) = [] ; Or replace them with NaN's, if yu want same...

2 days ago | 1

| accepted

Answered

how to pull out indicies from a matrix

Let A be your 2*m matrix... r1 = A(1,:) ; r2 = A(2,:) ; iwant = r2(r1==1) iwant = r2(r1==2) From matrix directly. iwan...

how to pull out indicies from a matrix

Let A be your 2*m matrix... r1 = A(1,:) ; r2 = A(2,:) ; iwant = r2(r1==1) iwant = r2(r1==2) From matrix directly. iwan...

2 days ago | 0

| accepted

Answered

how can I convert many images from m x n x 3 to m x n by rgb2gray?

img = dir('*.jpeg') ; N = length(img) ; for i = 1:N thisimg = img(i).name ; I = imread(thisimg) ; Ig = rgb2...

how can I convert many images from m x n x 3 to m x n by rgb2gray?

img = dir('*.jpeg') ; N = length(img) ; for i = 1:N thisimg = img(i).name ; I = imread(thisimg) ; Ig = rgb2...

5 days ago | 1

Answered

Plotting two variables from a loop

% Constants g=9.81; m=1.5; A=0.028; Cd=0.8; rho=1.225; B=(rho*Cd*A)/2; Dt=1e-6; % Initial values x=0; y=6.4008; %21...

Plotting two variables from a loop

% Constants g=9.81; m=1.5; A=0.028; Cd=0.8; rho=1.225; B=(rho*Cd*A)/2; Dt=1e-6; % Initial values x=0; y=6.4008; %21...

5 days ago | 1

| accepted

Answered

plot values in the loop

p=3 ; k = 1:p ; val = zeros(1,p) ; for i = 1:length(p) %something if %something d=d+1 val(i) = ...

plot values in the loop

p=3 ; k = 1:p ; val = zeros(1,p) ; for i = 1:length(p) %something if %something d=d+1 val(i) = ...

6 days ago | 0

Answered

How to plot an inversely proportional graph ?

plot(k,1./T) ; You can find the inverse/ reciprocal using 1./T.

How to plot an inversely proportional graph ?

plot(k,1./T) ; You can find the inverse/ reciprocal using 1./T.

6 days ago | 0

| accepted

Answered

How to make a function that calculates percentage change in a vector

Loop: x=csvread('gdp.csv') for i=1:length(x)-1 p = (x(i+1)-x(i))/(x(i)) end Vector: p = diff(x)./x(1:end-1) ;

How to make a function that calculates percentage change in a vector

Loop: x=csvread('gdp.csv') for i=1:length(x)-1 p = (x(i+1)-x(i))/(x(i)) end Vector: p = diff(x)./x(1:end-1) ;

6 days ago | 0

Answered

How get this program to calculate derivative properly?

Yn=A*sin(w*t); dYn = A*w*cos(w*t) ;

How get this program to calculate derivative properly?

Yn=A*sin(w*t); dYn = A*w*cos(w*t) ;

6 days ago | 0

Answered

converting 2D XY coordinated into Grid format

It depends whether your data is gridded or scattered. Follow the below code to get what you want. Let A be your m*2 array. x =...

converting 2D XY coordinated into Grid format

It depends whether your data is gridded or scattered. Follow the below code to get what you want. Let A be your m*2 array. x =...

8 days ago | 0

Answered

Area of intersection of two ellipses

You can follow the below steps. For the two ellipses i.e get coordinates of both the ellipses. Let L1, L2 be your coordinates ...

Area of intersection of two ellipses

You can follow the below steps. For the two ellipses i.e get coordinates of both the ellipses. Let L1, L2 be your coordinates ...

8 days ago | 0

| accepted

Answered

I can’t get the program to run for some reason. I want to use for loops for this program.

You need not to use two for loops.....that is a wrong idea. This is what you should do: Ti = 0; Tinc = pi/180; Tf = pi...

I can’t get the program to run for some reason. I want to use for loops for this program.

You need not to use two for loops.....that is a wrong idea. This is what you should do: Ti = 0; Tinc = pi/180; Tf = pi...

9 days ago | 0

Answered

need Matlab program to count the number of lines until dollar sign is given

Read about strfind. YOu can search for you string using this.

need Matlab program to count the number of lines until dollar sign is given

Read about strfind. YOu can search for you string using this.

9 days ago | 0

Answered

Single line of code for vectorization, Need Help!!

r = [0.1 0.2 0.3 0.4 0.5] ; h = [0.2 0.3 0.4 0.5] ; [r,h] = meshgrid(r,h) ; v = 1/3*pi*r.^r.*h ;

Single line of code for vectorization, Need Help!!

r = [0.1 0.2 0.3 0.4 0.5] ; h = [0.2 0.3 0.4 0.5] ; [r,h] = meshgrid(r,h) ; v = 1/3*pi*r.^r.*h ;

9 days ago | 0

Answered

How do you detect duplicate values within a random array?

If you want to use inbuilt functions......you can use unique. Read about it. Let A be your array. B = unique(A) ; if lengt...

How do you detect duplicate values within a random array?

If you want to use inbuilt functions......you can use unique. Read about it. Let A be your array. B = unique(A) ; if lengt...

9 days ago | 0

| accepted

Answered

Plotting question using data (water saturation)

sat_data = water_sattemp_data ; plot(sat_data(:,1),sat_data(:,2)) ;

Plotting question using data (water saturation)

sat_data = water_sattemp_data ; plot(sat_data(:,1),sat_data(:,2)) ;

9 days ago | 0

Answered

Adding Array elements from one element to another

Let A be your array. iwant = sum(A(487146:513795)) ;

Adding Array elements from one element to another

Let A be your array. iwant = sum(A(487146:513795)) ;

9 days ago | 0

| accepted