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

Professional Interests: Mathematical Computing

Answered

How to draw 3D plot in matlab with labels?

You can porceed something like this: A = rand(70,6) ; x = 1:70 ; y = ones(size(x)) ; figure hold on for i = 1:6 plot...

How to draw 3D plot in matlab with labels?

You can porceed something like this: A = rand(70,6) ; x = 1:70 ; y = ones(size(x)) ; figure hold on for i = 1:6 plot...

environ 17 heures ago | 0

Answered

how I can plot 3 independent variables in matlab (4 dimensions)?

m = 10 ; n = 10 ; p =10 ; x = linspace(0,1,m); y = linspace(0,2,n) ; z = linspace(2,3,p) ; [X,Y,Z] = meshgrid(x,y,z) ; f...

how I can plot 3 independent variables in matlab (4 dimensions)?

m = 10 ; n = 10 ; p =10 ; x = linspace(0,1,m); y = linspace(0,2,n) ; z = linspace(2,3,p) ; [X,Y,Z] = meshgrid(x,y,z) ; f...

environ 20 heures ago | 0

Answered

Request to assist:-

A=[1,0,3; 0,5,6; 7,8,9] ; iwant = A(1,3)+A(2,3)

Request to assist:-

A=[1,0,3; 0,5,6; 7,8,9] ; iwant = A(1,3)+A(2,3)

environ 20 heures ago | 0

Answered

How to extract the events which have more than 3 consecutive rows

idx3 = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

How to extract the events which have more than 3 consecutive rows

idx3 = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

environ 22 heures ago | 0

Answered

How to calculate error between 2 curves ?

If y0 is original value and y1 is obtained value. You can get the error using : dy = y0-y1 ; % error abs_dy = abs(y0-y1) ; ...

How to calculate error between 2 curves ?

If y0 is original value and y1 is obtained value. You can get the error using : dy = y0-y1 ; % error abs_dy = abs(y0-y1) ; ...

2 jours ago | 0

Answered

finding eigenvectors matching to eigenvalues

The respective Eigenvalues would be diag(D) v1 = V(:,1) ; e1 = D(1,1) ; v2 = V(:,2) ; e2 = D(2,2) ; % and so on

finding eigenvectors matching to eigenvalues

The respective Eigenvalues would be diag(D) v1 = V(:,1) ; e1 = D(1,1) ; v2 = V(:,2) ; e2 = D(2,2) ; % and so on

2 jours ago | 1

| accepted

Answered

Point of intersection of two plotted column vectors

This your function.....go for it. https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138...

Point of intersection of two plotted column vectors

This your function.....go for it. https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138...

3 jours ago | 0

Answered

help random numbers generator

a = -0.5 ; b = 0.5 ; N = 10 ; r = (b-a).*randn(N,1) + a;

help random numbers generator

a = -0.5 ; b = 0.5 ; N = 10 ; r = (b-a).*randn(N,1) + a;

3 jours ago | 1

Answered

Error for exceeding the loop

Why you have made code that complex? It is a simple task. You can use intersect. d = {[5:10] [20:30]}; e = [1 2 7 8 9 11 12 1...

Error for exceeding the loop

Why you have made code that complex? It is a simple task. You can use intersect. d = {[5:10] [20:30]}; e = [1 2 7 8 9 11 12 1...

3 jours ago | 0

| accepted

Answered

How convert for loop to while loop?

A=zeros(5,8); [r,c]=size(A); %for loop i = 0 ; while i<r % loops over rows i = i+1 ; j = 0 ; while j<c % loops o...

How convert for loop to while loop?

A=zeros(5,8); [r,c]=size(A); %for loop i = 0 ; while i<r % loops over rows i = i+1 ; j = 0 ; while j<c % loops o...

3 jours ago | 1

| accepted

Answered

how to pass function as argument ??

Read about anonymous functions. f = @(x) 5*x^3-3*x^2+2*x-2 ; Any value can be evaluated using: f(1) f(2)

how to pass function as argument ??

Read about anonymous functions. f = @(x) 5*x^3-3*x^2+2*x-2 ; Any value can be evaluated using: f(1) f(2)

3 jours ago | 0

Answered

How do I perform Gaussian elimination?

https://in.mathworks.com/matlabcentral/fileexchange/48571-gauss-elimination-method https://gist.github.com/esromneb/1d57b1d16...

How do I perform Gaussian elimination?

https://in.mathworks.com/matlabcentral/fileexchange/48571-gauss-elimination-method https://gist.github.com/esromneb/1d57b1d16...

3 jours ago | 0

| accepted

Answered

How can I check if a point (x,y) is either inside or outside a shape in a graph created be a set of experimental points

Read about inpolygon. This will help you to get whether the give point is inside or outside the given closed region.

How can I check if a point (x,y) is either inside or outside a shape in a graph created be a set of experimental points

Read about inpolygon. This will help you to get whether the give point is inside or outside the given closed region.

3 jours ago | 1

| accepted

Answered

Sum all possible combinations of tablecolumns

You can get all possible combinations of k columns choosen out of given n columns using nchoosek. REad about this function. You ...

Sum all possible combinations of tablecolumns

You can get all possible combinations of k columns choosen out of given n columns using nchoosek. REad about this function. You ...

3 jours ago | 0

| accepted

Answered

Declared variable shown as undefined

N=4; function cost=hybrid_cost(x,N) cost=0; T1=0; q=zeros(N); q(1,1)=x(1); q(N,N)=x(2); M=create_M(x); Ai...

Declared variable shown as undefined

N=4; function cost=hybrid_cost(x,N) cost=0; T1=0; q=zeros(N); q(1,1)=x(1); q(N,N)=x(2); M=create_M(x); Ai...

3 jours ago | 0

Answered

How do I include the row and column values say P = [2;4] into an equation where z = 10 + 2 (where 2 is the "x" cordinate of P? Thank you

P = [2;4] ; z = 10+P(1) ; You should read about MATLAB array indexing.

How do I include the row and column values say P = [2;4] into an equation where z = 10 + 2 (where 2 is the "x" cordinate of P? Thank you

P = [2;4] ; z = 10+P(1) ; You should read about MATLAB array indexing.

3 jours ago | 0

Answered

Voronoi Tesselations in Matlab

clc; clear all ; % Inner Square S1 = [-5 -5 ; 5 -5 ; 5 5 ; -5 5] ; % Outer Square S2 = [-10 -10 ; 10 -10 ; 10 10 ; -10 10]...

Voronoi Tesselations in Matlab

clc; clear all ; % Inner Square S1 = [-5 -5 ; 5 -5 ; 5 5 ; -5 5] ; % Outer Square S2 = [-10 -10 ; 10 -10 ; 10 10 ; -10 10]...

3 jours ago | 1

Answered

Using finite differences to find the displacement (x,y) of a projectile including the effect of drag

There was a type error in updating XxN.....it was typed as xxN instead of XxN.....find the below corrected code: close all clc...

Using finite differences to find the displacement (x,y) of a projectile including the effect of drag

There was a type error in updating XxN.....it was typed as xxN instead of XxN.....find the below corrected code: close all clc...

4 jours ago | 0

Answered

Stress strain average unique sample points

If (x,y) are your data points. Use the following to avoid the error. [x,idx] = unique(x) ; y = y(idx) ; yi = interp1(x,y,x...

Stress strain average unique sample points

If (x,y) are your data points. Use the following to avoid the error. [x,idx] = unique(x) ; y = y(idx) ; yi = interp1(x,y,x...

4 jours ago | 0

| accepted

Answered

Contourf is plotting weird lines. How to remove them?

Use pcolor with shading interp instead of contourf.

Contourf is plotting weird lines. How to remove them?

Use pcolor with shading interp instead of contourf.

4 jours ago | 1

Answered

Indexing problem based on value?

B = A(1:6) You should read about array indexing in MATLAB. MATLAB indices are always nonzero positive integers. When you use ...

Indexing problem based on value?

B = A(1:6) You should read about array indexing in MATLAB. MATLAB indices are always nonzero positive integers. When you use ...

4 jours ago | 0

| accepted

Answered

Why does probabililty distribution for 3D matrix not work with NaN values?

You can skip the computation using isnan. It gives you 1 as out put if number is nan and 0 if number is not a nan. Read about is...

Why does probabililty distribution for 3D matrix not work with NaN values?

You can skip the computation using isnan. It gives you 1 as out put if number is nan and 0 if number is not a nan. Read about is...

4 jours ago | 0

Answered

Draw a line between two points on plotted data and compute its length

px = [1, 2, 5]; py = [1, 2, 1.5]; x = [px(1) py(1)] ; y = [px(2) py(2)] ; z = [px(3) py(3)] ; plot3(x,y,z,'r') d =...

Draw a line between two points on plotted data and compute its length

px = [1, 2, 5]; py = [1, 2, 1.5]; x = [px(1) py(1)] ; y = [px(2) py(2)] ; z = [px(3) py(3)] ; plot3(x,y,z,'r') d =...

4 jours ago | 1

| accepted

Answered

Function Code ( Matlab )

x=9 ; a=1; b=3 ; c=5 ; F = (log(a*x^2+b*x+c)-sin(a*x^2+b*x+c))/(4*pi*x^2+cos(x-2)*(a*x^2+b*x+c)) You must read about MATLA...

Function Code ( Matlab )

x=9 ; a=1; b=3 ; c=5 ; F = (log(a*x^2+b*x+c)-sin(a*x^2+b*x+c))/(4*pi*x^2+cos(x-2)*(a*x^2+b*x+c)) You must read about MATLA...

5 jours ago | 0

Answered

Heatmap of 2D plot

t=[1/512:1/512:5]'; z = zeros(size(t)); col = amp; % This is the color, vary with amp in this case. surface([t t],[amp amp],...

Heatmap of 2D plot

t=[1/512:1/512:5]'; z = zeros(size(t)); col = amp; % This is the color, vary with amp in this case. surface([t t],[amp amp],...

5 jours ago | 0

Answered

How to export the result of for loop to the excel file

A = pareto_frontier(:,2:3) ; xlswrite('test.xlsx',A) Also have a look on write2table.

How to export the result of for loop to the excel file

A = pareto_frontier(:,2:3) ; xlswrite('test.xlsx',A) Also have a look on write2table.

5 jours ago | 0

| accepted

Answered

Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 0-by-1.

You want this. S = load("data.mat") ; data = S.Fe2MnGe_new ; v = data(:,1) ; ca = data(:,2) ; z = data(:,3) ; nx = ...

Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 0-by-1.

You want this. S = load("data.mat") ; data = S.Fe2MnGe_new ; v = data(:,1) ; ca = data(:,2) ; z = data(:,3) ; nx = ...

5 jours ago | 0

| accepted

Answered

Compare and remove duplicates with min value of another column

num = xlsread("sample.xlsx") ; C1 = num(:,1) ; C4 = num(:,end) ; [c,ia,ib] = unique(C1) ; N = length(c) ; iwant = zero...

Compare and remove duplicates with min value of another column

num = xlsread("sample.xlsx") ; C1 = num(:,1) ; C4 = num(:,end) ; [c,ia,ib] = unique(C1) ; N = length(c) ; iwant = zero...

5 jours ago | 0

Answered

How to find specific value in a table

You canget the index where it lies using strfind. Let T be your table. idx = strfind(T.Formula,'H2O') ; % logical index i...

How to find specific value in a table

You canget the index where it lies using strfind. Let T be your table. idx = strfind(T.Formula,'H2O') ; % logical index i...

5 jours ago | 0

| accepted