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

Professional Interests: Mathematical Computing

Answered

Spline to optimize the curve

c = [ 2.0000 2.0000 2.2703 1.6902 4.7244 7.6318 12.0984 9.1030 12.0000 10.0000 ] ; x = c(:,1) ; y = c(:,2...

Spline to optimize the curve

c = [ 2.0000 2.0000 2.2703 1.6902 4.7244 7.6318 12.0984 9.1030 12.0000 10.0000 ] ; x = c(:,1) ; y = c(:,2...

11 hours ago | 0

Answered

plot coordinates in the center of grid

xy = [ 11.2871990000000 75.8008150000000 11.2826320000000 75.8033060000000 11.2648170000000 75.8115220000000 11.287192000000...

plot coordinates in the center of grid

xy = [ 11.2871990000000 75.8008150000000 11.2826320000000 75.8033060000000 11.2648170000000 75.8115220000000 11.287192000000...

15 hours ago | 1

| accepted

Answered

How can I generate an .stl file from a symbolically generated 3D surface?

syms u v x = (-2/15)*cos(u)* (3*cos(v) - 30*sin(u) + 90*(cos(u))^4*sin(u) - 60*(cos(u))^6*sin(u) + 5*cos(u)*cos(v)*sin(u)) y =...

How can I generate an .stl file from a symbolically generated 3D surface?

syms u v x = (-2/15)*cos(u)* (3*cos(v) - 30*sin(u) + 90*(cos(u))^4*sin(u) - 60*(cos(u))^6*sin(u) + 5*cos(u)*cos(v)*sin(u)) y =...

18 hours ago | 0

Answered

Finding the angle between lines that Ive plotted

YOu have multiple ways to do this. Refer below: https://in.mathworks.com/matlabcentral/answers/78195-how-to-measure-angle-be...

Finding the angle between lines that Ive plotted

YOu have multiple ways to do this. Refer below: https://in.mathworks.com/matlabcentral/answers/78195-how-to-measure-angle-be...

20 hours ago | 0

Answered

Stop the execution with a certain number of second

t1 = tic ; while t1 t2 = toc(t1) ; if t2 > 10 fprintf('loop breaked because 10 seconds passed\n') ...

Stop the execution with a certain number of second

t1 = tic ; while t1 t2 = toc(t1) ; if t2 > 10 fprintf('loop breaked because 10 seconds passed\n') ...

4 days ago | 0

Answered

index exceeds matrix dimension,Subscript indices must either be real positive integers or logicals

v1(1,t+dt1)=((((-a1)^2)*v1(2,t+dt1))/(h1(2,t+dt1)-h1(1,t+dt1))*g-a1^2) In the above I could say that dt1 is a fraction...and yo...

index exceeds matrix dimension,Subscript indices must either be real positive integers or logicals

v1(1,t+dt1)=((((-a1)^2)*v1(2,t+dt1))/(h1(2,t+dt1)-h1(1,t+dt1))*g-a1^2) In the above I could say that dt1 is a fraction...and yo...

4 days ago | 0

| accepted

Answered

How can I interactively add info to plots, e.g. name of a curve?

x = rand(10,1) ; y = rand(10,1) ; plot(x,y,'.r') ; [px,py] = getpts() ; % double click on a point when prompts text...

How can I interactively add info to plots, e.g. name of a curve?

x = rand(10,1) ; y = rand(10,1) ; plot(x,y,'.r') ; [px,py] = getpts() ; % double click on a point when prompts text...

4 days ago | 0

Answered

How to filter the required coordinates which consist with same elevation?

filename = 'elevations.nc'; elev = ncread(filename, 'elevation')'; lon = ncread(filename, 'lon')'; lat = ncread(filename, '...

How to filter the required coordinates which consist with same elevation?

filename = 'elevations.nc'; elev = ncread(filename, 'elevation')'; lon = ncread(filename, 'lon')'; lat = ncread(filename, '...

4 days ago | 1

| accepted

Answered

Reading all the .wav files from a particular folder

files = dir('*.wav') ; N = length(files) ; for i = 1:N thisfile = files(i).name ; % do what you want end

Reading all the .wav files from a particular folder

files = dir('*.wav') ; N = length(files) ; for i = 1:N thisfile = files(i).name ; % do what you want end

4 days ago | 1

Answered

griddata not creating a smooth interpolation

Try scatteredinterpolant. Tmod=[50 100 150 175 200 240 245 245 245 245 245 245 245 245 230 200 150 125 110...

griddata not creating a smooth interpolation

Try scatteredinterpolant. Tmod=[50 100 150 175 200 240 245 245 245 245 245 245 245 245 230 200 150 125 110...

4 days ago | 0

Answered

How to put hat over a greek symbol express its value in legend of a plot?

Read here: https://in.mathworks.com/help/matlab/creating_plots/greek-letters-and-special-characters-in-graph-text.html

How to put hat over a greek symbol express its value in legend of a plot?

Read here: https://in.mathworks.com/help/matlab/creating_plots/greek-letters-and-special-characters-in-graph-text.html

4 days ago | 0

Answered

I have five data points (A, B, C, D, E) in a two dimensional plane. Based on the euclidean distance between these points how can I group them?

Read about kmeans.

I have five data points (A, B, C, D, E) in a two dimensional plane. Based on the euclidean distance between these points how can I group them?

Read about kmeans.

4 days ago | 0

Answered

How can I create a 2D plot using a parfor loop?

YOu cannot see the plot..but you can save it and late access it. L1 = 10; L2 = 5; L3 = 3; theta1 = (0:5:90); theta2 = (0...

How can I create a 2D plot using a parfor loop?

YOu cannot see the plot..but you can save it and late access it. L1 = 10; L2 = 5; L3 = 3; theta1 = (0:5:90); theta2 = (0...

4 days ago | 0

Answered

how to check whether a particular file is there in the datastore or not?

Read about exist, contains , strcmp

how to check whether a particular file is there in the datastore or not?

Read about exist, contains , strcmp

4 days ago | 0

Answered

Array indices must be positive integers or logical values (image processing)

I=x(i,j); % here I will be pixel value of image, it cannot be a index x(i,j)=xL(I)+( L(I)*lambda(i,j) ); Note that in MAT...

Array indices must be positive integers or logical values (image processing)

I=x(i,j); % here I will be pixel value of image, it cannot be a index x(i,j)=xL(I)+( L(I)*lambda(i,j) ); Note that in MAT...

4 days ago | 0

| accepted

Answered

problem in writing code

YOu have typed lambda wrong...typo error. delta=0.02; lambda=[0.01: 0.001 : 0.1]; p= lambda./delta; q1=delta-lambda+lam...

problem in writing code

YOu have typed lambda wrong...typo error. delta=0.02; lambda=[0.01: 0.001 : 0.1]; p= lambda./delta; q1=delta-lambda+lam...

4 days ago | 1

| accepted

Answered

Check if vector is increasing monotonely or just increasing

Refer here: http://matlabtricks.com/post-29/pattern-search-example-monotonically-increasing-or-decreasing-subset YOu should re...

Check if vector is increasing monotonely or just increasing

Refer here: http://matlabtricks.com/post-29/pattern-search-example-monotonically-increasing-or-decreasing-subset YOu should re...

4 days ago | 0

| accepted

Answered

Check if element in array are square of each other

a = [7 5 49] ; b = [49 5 7] ; idx = a.^2==b In idx if 1 , true, if zero false.

Check if element in array are square of each other

a = [7 5 49] ; b = [49 5 7] ; idx = a.^2==b In idx if 1 , true, if zero false.

4 days ago | 0

Answered

Change sign of every second element of a vector

A = rand(10,1) ; A(2:2:end) = -A(2:2:end) If you wat to your function, you should use like this: function newVector = cha...

Change sign of every second element of a vector

A = rand(10,1) ; A(2:2:end) = -A(2:2:end) If you wat to your function, you should use like this: function newVector = cha...

4 days ago | 0

| accepted

Answered

How can I read a text file and store its data inside a matrix?

clc; clear all ; fid = fopen ('40_8deg_HL_Both.txt', 'r'); data = textscan(fid, '%s %s %f %f %f %f %f %f %f %s', 'HeaderLine...

How can I read a text file and store its data inside a matrix?

clc; clear all ; fid = fopen ('40_8deg_HL_Both.txt', 'r'); data = textscan(fid, '%s %s %f %f %f %f %f %f %f %s', 'HeaderLine...

4 days ago | 0

| accepted

Answered

Interpolating a 3D Matrix using interp1

A = rand(14,14,221) ; % interpolation along row N = 100 ; [m,n,p] = size(A) ; iwant = zeros(m,N,p) ; xi = linspace(1,...

Interpolating a 3D Matrix using interp1

A = rand(14,14,221) ; % interpolation along row N = 100 ; [m,n,p] = size(A) ; iwant = zeros(m,N,p) ; xi = linspace(1,...

4 days ago | 0

Answered

How to plot a subset of x,y with group g according to fourth column

Let day, bottle, species, finalC be your data. I assume them to be columns and bottle is a cell array of strings. % GEt indi...

How to plot a subset of x,y with group g according to fourth column

Let day, bottle, species, finalC be your data. I assume them to be columns and bottle is a cell array of strings. % GEt indi...

4 days ago | 0

Answered

Determining the appropriate range for the given number.

x = 1:120 ; y = linspace(0.,6,120) ; xi = 1.5 ; yi = floor(interp1(y,x,xi)) ; fprintf('%f should be placed between %f ...

Determining the appropriate range for the given number.

x = 1:120 ; y = linspace(0.,6,120) ; xi = 1.5 ; yi = floor(interp1(y,x,xi)) ; fprintf('%f should be placed between %f ...

4 days ago | 0

| accepted

Answered

how to find the minimum value of the function of two variables with contour plot?

[c,h] = contour(X,Y,Z,'showtext','on'); min(h.LevelList)

how to find the minimum value of the function of two variables with contour plot?

[c,h] = contour(X,Y,Z,'showtext','on'); min(h.LevelList)

5 days ago | 0

Answered

How can I convert cell contents to a matrix?

Read about readtable. This is the best function to use for your case.

How can I convert cell contents to a matrix?

Read about readtable. This is the best function to use for your case.

5 days ago | 1

Answered

Removing overlapping pixels in black and white images

I = imread('image.jpeg') ; R = I(:,:,1) ; G = I(:,:,2) ; B = I(:,:,3) ; % Get black region I1 = rgb2gray(I) ; id...

Removing overlapping pixels in black and white images

I = imread('image.jpeg') ; R = I(:,:,1) ; G = I(:,:,2) ; B = I(:,:,3) ; % Get black region I1 = rgb2gray(I) ; id...

5 days ago | 0

Answered

Selecting a Range of Rows in An Array Based off a Certain Value.

Let A be your 1796990 x 4 matrix. % To pick rows which has 1 in column 3 B = A(A(:,3)==1,:) ; % % To pick rows which prec...

Selecting a Range of Rows in An Array Based off a Certain Value.

Let A be your 1796990 x 4 matrix. % To pick rows which has 1 in column 3 B = A(A(:,3)==1,:) ; % % To pick rows which prec...

5 days ago | 0

Answered

Problems with empty cell in a large matrix

Read about readtable. It will insert NaN's where ver values are missing. T = readtable('sample.txt') ;

Problems with empty cell in a large matrix

Read about readtable. It will insert NaN's where ver values are missing. T = readtable('sample.txt') ;

5 days ago | 0

Answered

different parts of a matrix

A = rand(900,15) ; A(3,1) % entire first column from line 3 A(33:58,1) % first column 33 to line 58 Read about MATLAB in...

different parts of a matrix

A = rand(900,15) ; A(3,1) % entire first column from line 3 A(33:58,1) % first column 33 to line 58 Read about MATLAB in...

6 days ago | 0

| accepted

Answered

select a circular region of data and find the average value in that region

Read about inpolygon. nx = 100 ; ny = 150 ; x = linspace(0,1,nx) ; y = linspace(0,1,ny) ; [X,Y] = meshgrid(x,y) ; Z ...

select a circular region of data and find the average value in that region

Read about inpolygon. nx = 100 ; ny = 150 ; x = linspace(0,1,nx) ; y = linspace(0,1,ny) ; [X,Y] = meshgrid(x,y) ; Z ...

6 days ago | 1