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

Professional Interests: Mathematical Computing

Answered

Searching point unknown on the grid

Read about knnsearch. Also interpolation works.

Searching point unknown on the grid

Read about knnsearch. Also interpolation works.

6 hours ago | 0

Answered

Removing zeros from a binary array if length of zeros is lesser than a value

input = [0;0;0;0;0;0;0;1;0;1;1;1;0;0;0;0;0;0;1;1;0;0;0;0] ; idx = input==1; % get the locations of 1 % split zeros and on...

Removing zeros from a binary array if length of zeros is lesser than a value

input = [0;0;0;0;0;0;0;1;0;1;1;1;0;0;0;0;0;0;1;1;0;0;0;0] ; idx = input==1; % get the locations of 1 % split zeros and on...

11 hours ago | 0

| accepted

Answered

how can i change this code

in = 0 ; pivot = table(in,index); In the above line you have indexed in to zero. There is no zero and negaitve indices in MAT...

how can i change this code

in = 0 ; pivot = table(in,index); In the above line you have indexed in to zero. There is no zero and negaitve indices in MAT...

13 hours ago | 0

Answered

How to take the inverse of each individual array value and store it to a new array?

If R is value, if you want inverse use C = 1/R ; If R is an array use: C = 1./R ; In your case..use Conductances = 1....

How to take the inverse of each individual array value and store it to a new array?

If R is value, if you want inverse use C = 1/R ; If R is an array use: C = 1./R ; In your case..use Conductances = 1....

14 hours ago | 0

Answered

selecting specific rows from a matrix corresponding to the columns of other matrix

Let A abd B be your matrices of size 40*2 and 25000*9. [m,n] = size(A) ; C = cell(m,1) ; for i = 1:m C{i} = B(A(i,1...

selecting specific rows from a matrix corresponding to the columns of other matrix

Let A abd B be your matrices of size 40*2 and 25000*9. [m,n] = size(A) ; C = cell(m,1) ; for i = 1:m C{i} = B(A(i,1...

14 hours ago | 0

| accepted

Answered

Vector plot over a surface plot

TT = hypot(qx, qy); figure() pcolor(x, y, TT); xlim([-7 7]); ylim([-5 5]) colormap jet colorbar view(2) hold on quiver(...

Vector plot over a surface plot

TT = hypot(qx, qy); figure() pcolor(x, y, TT); xlim([-7 7]); ylim([-5 5]) colormap jet colorbar view(2) hold on quiver(...

14 hours ago | 0

| accepted

Answered

Calculate the length of symbolic expression

S = char(df) ; % convert sym to string idx = strfind(s,' ') ; % get empty spaces S(idx) = [] ; % remove the mepty sp...

Calculate the length of symbolic expression

S = char(df) ; % convert sym to string idx = strfind(s,' ') ; % get empty spaces S(idx) = [] ; % remove the mepty sp...

1 day ago | 0

| accepted

Answered

how to plot euler formula in matlab?

i = linspace(0,1,100) ; y = exp(100*i*pi) ; plot(i,y)

how to plot euler formula in matlab?

i = linspace(0,1,100) ; y = exp(100*i*pi) ; plot(i,y)

1 day ago | 0

Answered

K-Means Matlab cluster assignment

If idx are the indices and P are the points you have. figure hold on for i = 1:4 plot(P(idx==i,1),P(idx==i,2),'.') ; ...

K-Means Matlab cluster assignment

If idx are the indices and P are the points you have. figure hold on for i = 1:4 plot(P(idx==i,1),P(idx==i,2),'.') ; ...

1 day ago | 0

Answered

How can I limit a set of input data, 6 values, to a min and max point and as an integer

if min(user)<1 || max(user)>59 error("Check the input") endif

How can I limit a set of input data, 6 values, to a min and max point and as an integer

if min(user)<1 || max(user)>59 error("Check the input") endif

1 day ago | 0

Answered

Error to applying ismember for cell arrays

load("example.mat") ; N = length(A) ; A1 =zeros(N,1) ; for i = 1:N A1(i) = str2num(A{i}') ; end B1 = cell2mat(B)' ;...

Error to applying ismember for cell arrays

load("example.mat") ; N = length(A) ; A1 =zeros(N,1) ; for i = 1:N A1(i) = str2num(A{i}') ; end B1 = cell2mat(B)' ;...

1 day ago | 0

| accepted

Answered

Converting flowchart to matlab code

x = 0 ; % your initial x value y = 100 ; % your fixed y value t0 = 0 ; % initial time dt = 0.00025 ; % time step t =...

Converting flowchart to matlab code

x = 0 ; % your initial x value y = 100 ; % your fixed y value t0 = 0 ; % initial time dt = 0.00025 ; % time step t =...

1 day ago | 0

Answered

How do i find the intersection between two torus ?

Refer this: https://in.mathworks.com/matlabcentral/answers/93623-how-do-i-plot-the-line-of-intersection-between-two-surfaces

How do i find the intersection between two torus ?

Refer this: https://in.mathworks.com/matlabcentral/answers/93623-how-do-i-plot-the-line-of-intersection-between-two-surfaces

1 day ago | 1

| accepted

Answered

Make coastline contour from DEM (3d matrix)

[c,h] = contour(dem,[0.5 0.5]) ; % filter c idx = c(1,:)<1 ; c(:,idx) = NaN ; figure pcolor(dem) ; shading interp ;...

Make coastline contour from DEM (3d matrix)

[c,h] = contour(dem,[0.5 0.5]) ; % filter c idx = c(1,:)<1 ; c(:,idx) = NaN ; figure pcolor(dem) ; shading interp ;...

1 day ago | 0

| accepted

Answered

How to pull a range of values out of an array using a loop

Simply use: idx = tau < 1e8 ; In idx, 1 is acceptable and 0 is unacceptable. Read baout logical indexing. You need not run ...

How to pull a range of values out of an array using a loop

Simply use: idx = tau < 1e8 ; In idx, 1 is acceptable and 0 is unacceptable. Read baout logical indexing. You need not run ...

1 day ago | 0

Answered

how to combine three different column into a single colum using colon

If you have it in matrix...A use.. iwant = A(:) ;

how to combine three different column into a single colum using colon

If you have it in matrix...A use.. iwant = A(:) ;

1 day ago | 0

Answered

calculation x-value, given the y-value of a discrete function

Read about interp1, knnsearch.

calculation x-value, given the y-value of a discrete function

Read about interp1, knnsearch.

1 day ago | 0

Answered

How can i query last column based on another values column

You can use inequalitites ==, >, <, >=, <=. Read about them. Read the excel data into MATLAB using xlsread or readtable. ...

How can i query last column based on another values column

You can use inequalitites ==, >, <, >=, <=. Read about them. Read the excel data into MATLAB using xlsread or readtable. ...

1 day ago | 0

Answered

How to generate point cloud of two merged spheres?

Refer here: https://in.mathworks.com/help/matlab/math/numbers-placed-randomly-within-volume-of-sphere.html

How to generate point cloud of two merged spheres?

Refer here: https://in.mathworks.com/help/matlab/math/numbers-placed-randomly-within-volume-of-sphere.html

1 day ago | 0

Answered

Index in position 2 exceeds array bounds

You size of pos is 4x2....you are trying to accessing third coulmn from pos....where as it has only two columns..so obviously yo...

Index in position 2 exceeds array bounds

You size of pos is 4x2....you are trying to accessing third coulmn from pos....where as it has only two columns..so obviously yo...

1 day ago | 0

Answered

Is there a way to pass in a matrix of color values (n*3) into plot in matlab

You need not use a loop..you can make your data a matrix and use plot. X = repmat(1:10,10,1) ; Y = rand(10) ; plot(X',Y')

Is there a way to pass in a matrix of color values (n*3) into plot in matlab

You need not use a loop..you can make your data a matrix and use plot. X = repmat(1:10,10,1) ; Y = rand(10) ; plot(X',Y')

1 day ago | 0

Answered

Convert 2D data to 3D matrix

If T is your Table...you can access the data of the column using T.(1) , T.(2), T.(3) etc.,. If you have column names....you can...

Convert 2D data to 3D matrix

If T is your Table...you can access the data of the column using T.(1) , T.(2), T.(3) etc.,. If you have column names....you can...

1 day ago | 1

Answered

store multiple values in one variable

dataset_folder='D:\Project\resize\'; file_name=dir(fullfile(dataset_folder,'*.jpg')); total_images=numel(file_name); r = zero...

store multiple values in one variable

dataset_folder='D:\Project\resize\'; file_name=dir(fullfile(dataset_folder,'*.jpg')); total_images=numel(file_name); r = zero...

2 days ago | 0

| accepted

Answered

How to delete values when value is 3&4 then 7&8 then 11&12....

If you have an array A...To remove a specific element use: A(A==val) = [] ;

How to delete values when value is 3&4 then 7&8 then 11&12....

If you have an array A...To remove a specific element use: A(A==val) = [] ;

6 days ago | 1

Answered

getting error in calculation and plot. what is the exact problem

YOu have a function handles in plot..you need to send input to those functions handles. P=101.325; a1=7.19736;b1=1574.99;...

getting error in calculation and plot. what is the exact problem

YOu have a function handles in plot..you need to send input to those functions handles. P=101.325; a1=7.19736;b1=1574.99;...

6 days ago | 0

Answered

How can eliminate features whose values are zero from array?

If A is your array..you can remove zeros using: A(A==0) = [] ; Or A = A(A~=0) ;

How can eliminate features whose values are zero from array?

If A is your array..you can remove zeros using: A(A==0) = [] ; Or A = A(A~=0) ;

6 days ago | 0

| accepted

Answered

How to map two different gray pattern in two images?

You can make boundary as below: I = imread('temp1.jpg') ; [nx,ny,nz] = size(I) ; [X,Y] = meshgrid(1:ny,1:nx) ; id = I~...

How to map two different gray pattern in two images?

You can make boundary as below: I = imread('temp1.jpg') ; [nx,ny,nz] = size(I) ; [X,Y] = meshgrid(1:ny,1:nx) ; id = I~...

6 days ago | 0

Answered

How to arrainge data to use streamline?

I guess what you have is unstructured FEM mesh data. YOu need to convert it to grided data. You can do inteprolation using gridd...

How to arrainge data to use streamline?

I guess what you have is unstructured FEM mesh data. YOu need to convert it to grided data. You can do inteprolation using gridd...

7 days ago | 0

Answered

Error using plot Conversion to double from sym is not possible.

YOu have po to be symbolic element. YOu need to substitute x and get the value in double and plot. clc; clear all; syms x ...

Error using plot Conversion to double from sym is not possible.

YOu have po to be symbolic element. YOu need to substitute x and get the value in double and plot. clc; clear all; syms x ...

7 days ago | 0