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

Professional Interests: Mathematical Computing

Answered

Matlab matrices and vectors

Read about MATLAB indexing.......if A is given array. A(1:3) % gives first three elements A(end) % gives last element ...

Matlab matrices and vectors

Read about MATLAB indexing.......if A is given array. A(1:3) % gives first three elements A(end) % gives last element ...

1 hour ago | 2

Answered

Matlab matrixes and codes

Read the basic documentation instead of asking simple questions. iwant = ones(20) ;

Matlab matrixes and codes

Read the basic documentation instead of asking simple questions. iwant = ones(20) ;

2 hours ago | 0

| accepted

Answered

Writing a for loop to perform an operation on a vector

Vectorized x = [4,2,6,5,3,8,2] ; n = 1:7 ; %[n1 n2 n3 n4 n5 n6 n7] ; iwant = sum((1+x(1:6)).^n(1:6)) ; Loop: x = [4,2,...

Writing a for loop to perform an operation on a vector

Vectorized x = [4,2,6,5,3,8,2] ; n = 1:7 ; %[n1 n2 n3 n4 n5 n6 n7] ; iwant = sum((1+x(1:6)).^n(1:6)) ; Loop: x = [4,2,...

13 hours ago | 0

Answered

How to change background color of a surf

pcolor(x,y,z) axis off % box on % shading interp % colorbar

How to change background color of a surf

pcolor(x,y,z) axis off % box on % shading interp % colorbar

14 hours ago | 0

Answered

How to compare values within a matrix?

In case are you looking for this? idx = find(accuracy < 0.05)

How to compare values within a matrix?

In case are you looking for this? idx = find(accuracy < 0.05)

14 hours ago | 0

Answered

Calculating the distance/error between two graphs when the coordinates are given. Coordinates are not of equal size

You can get A to the size of B using interpolation vice versa. Read about it. % Get A to the size of B using interpolation [...

Calculating the distance/error between two graphs when the coordinates are given. Coordinates are not of equal size

You can get A to the size of B using interpolation vice versa. Read about it. % Get A to the size of B using interpolation [...

14 hours ago | 0

| accepted

Answered

how to make intersection?

Read about knnsearch. With this you can pick the nearest point to the given point. Or you can use this file exchange: http://...

how to make intersection?

Read about knnsearch. With this you can pick the nearest point to the given point. Or you can use this file exchange: http://...

14 hours ago | 0

Answered

function for sum of each two next values

Let V and p be your arrays of velcoity and power. k = 2; A = 9; f = exp(-(v(1:end-1)/A).^k) - exp(-(v(2:end)/A).^k); H ...

function for sum of each two next values

Let V and p be your arrays of velcoity and power. k = 2; A = 9; f = exp(-(v(1:end-1)/A).^k) - exp(-(v(2:end)/A).^k); H ...

17 hours ago | 0

| accepted

Answered

Why my data is not plotting the graph using plot(Q,h)

q = [0:1:100]; h = zeros(size(q)) ; for Q = 1:length(q) if val < h1 % < --- think of this line v_2 = ((Q/1...

Why my data is not plotting the graph using plot(Q,h)

q = [0:1:100]; h = zeros(size(q)) ; for Q = 1:length(q) if val < h1 % < --- think of this line v_2 = ((Q/1...

18 hours ago | 1

| accepted

Answered

Fig file extraction of data and legend from plots

If your extracted data is a matrix.....the order of legend should be order of rows.

Fig file extraction of data and legend from plots

If your extracted data is a matrix.....the order of legend should be order of rows.

19 hours ago | 0

Answered

what means this?

iter,eps: iter is number of iterations. eps stand for a small value. So your code runs either for 10 iterations or till the erro...

what means this?

iter,eps: iter is number of iterations. eps stand for a small value. So your code runs either for 10 iterations or till the erro...

19 hours ago | 0

| accepted

Answered

How to extract specific data from the data files?

iwant = interp1(CL,CD,0.6) This is the procedure: CL = [ 0.572526 0.601916 0.631107 ]; CD = [ 0.024868 0.025337 0.02590...

How to extract specific data from the data files?

iwant = interp1(CL,CD,0.6) This is the procedure: CL = [ 0.572526 0.601916 0.631107 ]; CD = [ 0.024868 0.025337 0.02590...

19 hours ago | 0

| accepted

Answered

Fill area inside 4 connected lines in a plot

Read about padzeros, padarrays. A = ones(5,4) ; iwant = zeros(8) ; iwant(3:7,3:6) = A ;

Fill area inside 4 connected lines in a plot

Read about padzeros, padarrays. A = ones(5,4) ; iwant = zeros(8) ; iwant(3:7,3:6) = A ;

20 hours ago | 0

Answered

Do not take any amount

pop=randi([100],20,8); [r1,c1]=size(pop); pool = zeros([],c1) ; count = 0 ; for i=1:r1 A=randi(100); if A<=90 ...

Do not take any amount

pop=randi([100],20,8); [r1,c1]=size(pop); pool = zeros([],c1) ; count = 0 ; for i=1:r1 A=randi(100); if A<=90 ...

20 hours ago | 1

| accepted

Answered

Problem using imagesc plot for non uniform values

data = importdata("data_analysis.txt") ; x = data(:,1) ; y = data(:,2) ; z1 = data(:,3) ; z2 = data(:,4) ; % Use int...

Problem using imagesc plot for non uniform values

data = importdata("data_analysis.txt") ; x = data(:,1) ; y = data(:,2) ; z1 = data(:,3) ; z2 = data(:,4) ; % Use int...

23 hours ago | 0

| accepted

Answered

Drawing a Best Line Fit for some Points

Read about polyfit. p = polyfit(x,y,1) ; yi = polyval(p,x) ; plot(x,y,'.r') hold on plot(x,yi,'b')

Drawing a Best Line Fit for some Points

Read about polyfit. p = polyfit(x,y,1) ; yi = polyval(p,x) ; plot(x,y,'.r') hold on plot(x,yi,'b')

1 day ago | 0

Answered

How to include text in a running figure

You can use text/ title with sprintf. for t = 1:100 plot(rand(1,10)) ; title(sprintf("time step = %s",num2str(t))) ; ...

How to include text in a running figure

You can use text/ title with sprintf. for t = 1:100 plot(rand(1,10)) ; title(sprintf("time step = %s",num2str(t))) ; ...

1 day ago | 0

Answered

How can i take ds/dx and ds/dy of a function numerically

ds/dx=-3*x^2+3*y^2 ds/dy = 6*x*y

How can i take ds/dx and ds/dy of a function numerically

ds/dx=-3*x^2+3*y^2 ds/dy = 6*x*y

1 day ago | 0

Answered

Plot variables (total could cover) from Netcdf file

Your tcdc is a 3D matrix. You can plot only one 2D matrix using pcolor. Follow the below: pcolor(longitude,latitude,tcdc(:,:,1)...

Plot variables (total could cover) from Netcdf file

Your tcdc is a 3D matrix. You can plot only one 2D matrix using pcolor. Follow the below: pcolor(longitude,latitude,tcdc(:,:,1)...

2 days ago | 0

| accepted

Answered

Counting occurance of exact word from string array

R1 = ["Ar* + Ar* "," Ar+ + Ar + e "]; % chemical reaction (string array; col1=reactants, col2=products) s = "Ar" ; n = nnz(s...

Counting occurance of exact word from string array

R1 = ["Ar* + Ar* "," Ar+ + Ar + e "]; % chemical reaction (string array; col1=reactants, col2=products) s = "Ar" ; n = nnz(s...

2 days ago | 0

Answered

Comparison of specific values from the same matrix

[val,idx] = min(Z(2:end))

Comparison of specific values from the same matrix

[val,idx] = min(Z(2:end))

3 days ago | 0

| accepted

Answered

Correlate two sets of data defined on different meshings of the same surface

You can get the respective mesh Z values to a required grid, using interpolation menthods. Read about griddata, scatteredinter...

Correlate two sets of data defined on different meshings of the same surface

You can get the respective mesh Z values to a required grid, using interpolation menthods. Read about griddata, scatteredinter...

3 days ago | 0

Answered

MSE and RMSE of a matrix

If yt and ye are the column vectors of theory and experimental values. You can get MSE, RMSE using: e = (ye - yt) % Errors ...

MSE and RMSE of a matrix

If yt and ye are the column vectors of theory and experimental values. You can get MSE, RMSE using: e = (ye - yt) % Errors ...

3 days ago | 0

Answered

Error Plot, vectors must be of same length. I can't understand where the error is exactly

Note that your Q is a row vector and not a column vector. You should use Q(1,:), Q(2,:) not Q(:,1), Q(:,2). D = 90.5*0.4814E-3...

Error Plot, vectors must be of same length. I can't understand where the error is exactly

Note that your Q is a row vector and not a column vector. You should use Q(1,:), Q(2,:) not Q(:,1), Q(:,2). D = 90.5*0.4814E-3...

3 days ago | 0

Answered

Create a series of vector with different name

s = '161724' v = [s(1:2),':',s(3:4),':',s(5:6)] If array s = ['161724'; '161725'; '161726'] ; k = repelem(":",size(s,1),1...

Create a series of vector with different name

s = '161724' v = [s(1:2),':',s(3:4),':',s(5:6)] If array s = ['161724'; '161725'; '161726'] ; k = repelem(":",size(s,1),1...

5 days ago | 0

Answered

Error with variable definition

t = 0:200; VaR = logninv(0.1,3,1) f = t.*logncdf(t,3,1)/0.1; % < ---- element by element operation CVaR = integral(f,-inf,...

Error with variable definition

t = 0:200; VaR = logninv(0.1,3,1) f = t.*logncdf(t,3,1)/0.1; % < ---- element by element operation CVaR = integral(f,-inf,...

5 days ago | 0

Answered

4 matrix generation depending on a specific value,

You can use this File eXchange: http://in.xl48.cn/matlabcentral/fileexchange/69507-npermutek s = [0 1] ; iwant1 = nper...

4 matrix generation depending on a specific value,

You can use this File eXchange: http://in.xl48.cn/matlabcentral/fileexchange/69507-npermutek s = [0 1] ; iwant1 = nper...

5 days ago | 0

Answered

Why is fimplicit not plotting x^2 = 0 ??

x = linspace(-5,+5,100) ; y = x.^2 ; plot(x,y)

Why is fimplicit not plotting x^2 = 0 ??

x = linspace(-5,+5,100) ; y = x.^2 ; plot(x,y)

5 days ago | 0

Answered

use a for loop to create a script that prints numbers 0 through 10, except 3 and 6

for i = 0 : 1 : 10 disp(i) if i == 3 || i == 6 printf("Value = %d\n") end end

use a for loop to create a script that prints numbers 0 through 10, except 3 and 6

for i = 0 : 1 : 10 disp(i) if i == 3 || i == 6 printf("Value = %d\n") end end

5 days ago | 0

| accepted