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

Professional Interests: Mathematical Computing

Answered

gradient issue for matlab

Let A be your 47X2 matrix. q = A(:,1) ; v = A(:,2) ; dq_dv = diff(q)./diff(v) ; % dq/dv dv_dq = diff(v)./diff(q) ; ...

gradient issue for matlab

Let A be your 47X2 matrix. q = A(:,1) ; v = A(:,2) ; dq_dv = diff(q)./diff(v) ; % dq/dv dv_dq = diff(v)./diff(q) ; ...

1 day ago | 0

| accepted

Answered

Varying value of stiffness

You may refer this: https://in.mathworks.com/matlabcentral/fileexchange/34381-mathieu-equation-parametric-oscillator

Varying value of stiffness

You may refer this: https://in.mathworks.com/matlabcentral/fileexchange/34381-mathieu-equation-parametric-oscillator

1 day ago | 0

| accepted

Answered

Check common elements in two vectors and remove them from both the vectors leaving any duplicate. (Example Inside)

A = [1 2 3 4 4 4 5 5 6] B = [2 4 5 5 9 ] new_A = setdiff(A,B) new_B = setdiff(B,A)

Check common elements in two vectors and remove them from both the vectors leaving any duplicate. (Example Inside)

A = [1 2 3 4 4 4 5 5 6] B = [2 4 5 5 9 ] new_A = setdiff(A,B) new_B = setdiff(B,A)

1 day ago | 0

Answered

Calculate minimum distance between points in a mesh

A = rand(20, 2); x = A(:, 1); % x coordinates y = A(:, 2); % y coordinates d = pdist2(A,A) ; % Get minimum distance d(d=...

Calculate minimum distance between points in a mesh

A = rand(20, 2); x = A(:, 1); % x coordinates y = A(:, 2); % y coordinates d = pdist2(A,A) ; % Get minimum distance d(d=...

1 day ago | 0

| accepted

Answered

How to rectify this error,

Don't run the function usinf run/ F5. Give inputs and call it. Theta = pi ; age = 30. ; chol = rand ; [J,grad] = compu...

How to rectify this error,

Don't run the function usinf run/ F5. Give inputs and call it. Theta = pi ; age = 30. ; chol = rand ; [J,grad] = compu...

1 day ago | 0

| accepted

Answered

Unknown variable with str2num ?

Read about str2num. It takes string as input and conerts it to number. If the input is not string it will throw error like in yo...

Unknown variable with str2num ?

Read about str2num. It takes string as input and conerts it to number. If the input is not string it will throw error like in yo...

1 day ago | 0

Answered

how to split channels of a video

If you have a RGB frame F os size m*n*3... R = F(:,:,1) ; G = F(:,:,2) ; B = F(:,:,3) ;

how to split channels of a video

If you have a RGB frame F os size m*n*3... R = F(:,:,1) ; G = F(:,:,2) ; B = F(:,:,3) ;

1 day ago | 0

Answered

Error using imread The file name or URL argument must be a string. Error in imread Error in image_block (line 29) currentfilename = imread(imagefiles);

imagefiles= dir('*.png'); for i=1:NFR currentfilename = imagefiles(i).name; I = imread(currentfilename); % Do what you want ...

Error using imread The file name or URL argument must be a string. Error in imread Error in image_block (line 29) currentfilename = imread(imagefiles);

imagefiles= dir('*.png'); for i=1:NFR currentfilename = imagefiles(i).name; I = imread(currentfilename); % Do what you want ...

1 day ago | 0

Answered

how to change color space of any video

vidObj = VideoReader('C:\Users\Public\Videos\Sample Videos\Wildlife.wmv'); % video file %% Read the video frame by frame nu...

how to change color space of any video

vidObj = VideoReader('C:\Users\Public\Videos\Sample Videos\Wildlife.wmv'); % video file %% Read the video frame by frame nu...

1 day ago | 0

| accepted

Answered

How do I read a block of data from excel sheet and store it in an array?

YOu may proceed like this: clc ; clear all ; T = readtable('plot.xlsx') ; N = length(unique(T.(1))) ; % loop for each fli...

How do I read a block of data from excel sheet and store it in an array?

YOu may proceed like this: clc ; clear all ; T = readtable('plot.xlsx') ; N = length(unique(T.(1))) ; % loop for each fli...

1 day ago | 0

Answered

Getting Error: Data must be numeric, datetime, duration or an array convertible to double.

YOu see t is double and y is of class sym. y has variable tau YOu have two options. Convert y into double by substituting pos...

Getting Error: Data must be numeric, datetime, duration or an array convertible to double.

YOu see t is double and y is of class sym. y has variable tau YOu have two options. Convert y into double by substituting pos...

1 day ago | 0

Answered

how to generate random points located on the surface of a hemisphere with its center at (2, 1, 3) and a radius of 6?

Use spherical coordinates,,,pick angles randomly and then convert into cartesian coordinates. Try this: N=500; r = 6; center...

how to generate random points located on the surface of a hemisphere with its center at (2, 1, 3) and a radius of 6?

Use spherical coordinates,,,pick angles randomly and then convert into cartesian coordinates. Try this: N=500; r = 6; center...

2 days ago | 1

Answered

find index of points in meshgrid under the line

Read about knnsearch. You will get the the required/ nearest indices for the given line from the grid.

find index of points in meshgrid under the line

Read about knnsearch. You will get the the required/ nearest indices for the given line from the grid.

2 days ago | 0

Answered

How to get data every second from table that has variable sampling time

Read about interp1. time = [ 0 0.0010 0.0021 0.0031 0.0041 0.0053 ] ; torque = [ 0 1.22 1.32 1.32 1.42 1.60] ; dt = 0.0...

How to get data every second from table that has variable sampling time

Read about interp1. time = [ 0 0.0010 0.0021 0.0031 0.0041 0.0053 ] ; torque = [ 0 1.22 1.32 1.32 1.42 1.60] ; dt = 0.0...

2 days ago | 0

Answered

matlab preallocation problem in for loop

fluid_HX = cell(length(t),1); for j=1:length(t) fluid_HX{j}=refprop(v(j),T_in(j),r410a); end

matlab preallocation problem in for loop

fluid_HX = cell(length(t),1); for j=1:length(t) fluid_HX{j}=refprop(v(j),T_in(j),r410a); end

2 days ago | 0

| accepted

Answered

Extract column from table

Area = rand(7,1) ; BoundingBox = rand(7,4) ; T = table(Area,BoundingBox) ; iwant = T.(2)(:,2)

Extract column from table

Area = rand(7,1) ; BoundingBox = rand(7,4) ; T = table(Area,BoundingBox) ; iwant = T.(2)(:,2)

2 days ago | 1

| accepted

Answered

SVM classifier contour plot

Read about inpolygon. On knowing the corodinates of contour...you can seperate inside and outside points.

SVM classifier contour plot

Read about inpolygon. On knowing the corodinates of contour...you can seperate inside and outside points.

2 days ago | 0

Answered

How do i code this question?

Loop is not required. format long g n=(10:20)' ; c = factorial(2*n)./((factorial(n+1)).*factorial(n)); idx = mod(n,2)==0 ...

How do i code this question?

Loop is not required. format long g n=(10:20)' ; c = factorial(2*n)./((factorial(n+1)).*factorial(n)); idx = mod(n,2)==0 ...

2 days ago | 0

Answered

odd and even index in cell

A={[113],[112],[42],[29],[113],[69],[86],[9],[0]}; B={[18],[14],[5],[39],[27],[11],[9],[7],[0]}; A(2:2:end) = {0} ; B(1:2:e...

odd and even index in cell

A={[113],[112],[42],[29],[113],[69],[86],[9],[0]}; B={[18],[14],[5],[39],[27],[11],[9],[7],[0]}; A(2:2:end) = {0} ; B(1:2:e...

2 days ago | 0

| accepted

Answered

how to plot this ?

angle=linspace(0,2*pi,360)'; C = [0 0] ; R = 1 ; x=C(1)+R*cos(angle); y=C(2)+R*sin(angle); % x1 = R/2*cos(angle) ; ...

how to plot this ?

angle=linspace(0,2*pi,360)'; C = [0 0] ; R = 1 ; x=C(1)+R*cos(angle); y=C(2)+R*sin(angle); % x1 = R/2*cos(angle) ; ...

3 days ago | 1

Answered

Unable to find correct 2*theta by simple expression like 2*theta = atan (2 * A(1,2)/A(1,1) - A(2,2))

I think you messed up with a bracket......The expression shoul dbe: A = [1 2 ; 2 4] ; theta = atan (2 * A(1,2)/(A(1,1) - A(2...

Unable to find correct 2*theta by simple expression like 2*theta = atan (2 * A(1,2)/A(1,1) - A(2,2))

I think you messed up with a bracket......The expression shoul dbe: A = [1 2 ; 2 4] ; theta = atan (2 * A(1,2)/(A(1,1) - A(2...

3 days ago | 0

Answered

interpolation of 3d data

data = importdata('slice1_grid1.txt') ; x = data(:,1) ; y = data(:,2) ; z = data(:,3) ; %% Make grid m = 5000 ; n = 5...

interpolation of 3d data

data = importdata('slice1_grid1.txt') ; x = data(:,1) ; y = data(:,2) ; z = data(:,3) ; %% Make grid m = 5000 ; n = 5...

7 days ago | 1

Answered

Plot function over two intervals

m = 500 ; x = linspace(-1,3,m) ; f = zeros(size(x)) ; f(x>=-1 & x <=0) = 1 ; f(x>=0 & x <2) = -1 ; plot(x,f)

Plot function over two intervals

m = 500 ; x = linspace(-1,3,m) ; f = zeros(size(x)) ; f(x>=-1 & x <=0) = 1 ; f(x>=0 & x <2) = -1 ; plot(x,f)

7 days ago | 0

| accepted

Answered

Merging multiple csv files into one mat file

csvfiles = dir('*.csv') ; N = length(csvfiles) ; A = cell(N,1) ; for i = 1:N A{i} = csvread(csvfiles(i).name) end

Merging multiple csv files into one mat file

csvfiles = dir('*.csv') ; N = length(csvfiles) ; A = cell(N,1) ; for i = 1:N A{i} = csvread(csvfiles(i).name) end

7 days ago | 0

| accepted

Answered

how do i adjust the alignment of the columns?

I would suggest this: a = [1 0.74 0.56 0.66]; b = (1:25)'; c = b * a; T = table(c(:,1),c(:,2),c(:,3),c(:,4),'VariableNames...

how do i adjust the alignment of the columns?

I would suggest this: a = [1 0.74 0.56 0.66]; b = (1:25)'; c = b * a; T = table(c(:,1),c(:,2),c(:,3),c(:,4),'VariableNames...

7 days ago | 0

Answered

How to retrieve pixel coordinates from sentinel lat/lon arrays for a given location?

Read about scatteredInterpolant if you want to do by intpolation......Read about knnsearch if you want a neasrest value.

How to retrieve pixel coordinates from sentinel lat/lon arrays for a given location?

Read about scatteredInterpolant if you want to do by intpolation......Read about knnsearch if you want a neasrest value.

7 days ago | 0

Answered

Deleting data from a graphics

x = rand(10,1) ; y = rand(10,1) ; figure hold on for i = 1:10 h = plot(x(i),y(i),'.r') ; end title('delete some ...

Deleting data from a graphics

x = rand(10,1) ; y = rand(10,1) ; figure hold on for i = 1:10 h = plot(x(i),y(i),'.r') ; end title('delete some ...

7 days ago | 0

| accepted

Answered

How to compare each element of matrix having binary numbers?

idx = a ==b

How to compare each element of matrix having binary numbers?

idx = a ==b

7 days ago | 0

| accepted