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

Professional Interests: Mathematical Computing

Answered

plotting 2 graphs on the same axes

Read about hold on. plot(rand(1,10)) hold on plot(rand(1,10))

plotting 2 graphs on the same axes

Read about hold on. plot(rand(1,10)) hold on plot(rand(1,10))

circa un'ora ago | 0

Answered

how to find values of y for a given x when both are arrays?

Let (x,y) be data you have. And you want to find yi for given xi. For this you have to do interpolation. Read about interp1. yi...

how to find values of y for a given x when both are arrays?

Let (x,y) be data you have. And you want to find yi for given xi. For this you have to do interpolation. Read about interp1. yi...

circa 3 ore ago | 0

Answered

Make series in matrix

x = 1:5 ; p = 1:5 ; A = x'.^p ; %% A = repmat(x,5,1) ; B = (A'.^p)'

Make series in matrix

x = 1:5 ; p = 1:5 ; A = x'.^p ; %% A = repmat(x,5,1) ; B = (A'.^p)'

circa 4 ore ago | 0

| accepted

Answered

what is wrong?

x=-3:0.1:3 y=sin(x).*cos(2*x)+1 ; % element by element multilication plot(x,y)

what is wrong?

x=-3:0.1:3 y=sin(x).*cos(2*x)+1 ; % element by element multilication plot(x,y)

circa 4 ore ago | 0

Answered

Randomly Shuffle X and Y

Read about randperm. y = 1:5 ; n = length(y) ; idx = randperm(n) ; y(idx)

Randomly Shuffle X and Y

Read about randperm. y = 1:5 ; n = length(y) ; idx = randperm(n) ; y(idx)

circa 7 ore ago | 0

Answered

Seek: more efficient implementation

function H_L1 = H2_GFL(N, max_periods) num_rows = max_periods * N; H_L1 = zeros(num_rows, 2, N); rand_supply = rand(num_ro...

Seek: more efficient implementation

function H_L1 = H2_GFL(N, max_periods) num_rows = max_periods * N; H_L1 = zeros(num_rows, 2, N); rand_supply = rand(num_ro...

circa 9 ore ago | 0

Answered

how can i generate 4 nodes lie in a straight line, and how to find midpoint between first and last point. Thank you

You need any two points to get a striaght line. So I am selecting two random points to plot a line here. % Random points to pl...

how can i generate 4 nodes lie in a straight line, and how to find midpoint between first and last point. Thank you

You need any two points to get a striaght line. So I am selecting two random points to plot a line here. % Random points to pl...

circa 11 ore ago | 0

Answered

Generate Specific noise(i.e. 60 or 70 Hz) Matlab

L = 60 ; % Length in sec f = 60 ; % Frequency in Hz...

Generate Specific noise(i.e. 60 or 70 Hz) Matlab

L = 60 ; % Length in sec f = 60 ; % Frequency in Hz...

circa 12 ore ago | 0

Answered

Interpolation and curve line

x=[-5 -4 -3 -2 -1 0 1 2 3 4 5]; y=[0 .254 .508 .762 1.016 1.27 1.016 .762 .508 .254 0]; % Interpolation xi = linspace(min(x...

Interpolation and curve line

x=[-5 -4 -3 -2 -1 0 1 2 3 4 5]; y=[0 .254 .508 .762 1.016 1.27 1.016 .762 .508 .254 0]; % Interpolation xi = linspace(min(x...

circa 12 ore ago | 0

Answered

How to plot min and max values on graph

X = 0:0.1:10; Y = (X.^(1.01))+4*cos((3/4).*X.*pi) - 2*sin((2/3)*pi.*X)-0.25; % min [val0,idx0] = min(Y) ; % max [val1,id...

How to plot min and max values on graph

X = 0:0.1:10; Y = (X.^(1.01))+4*cos((3/4).*X.*pi) - 2*sin((2/3)*pi.*X)-0.25; % min [val0,idx0] = min(Y) ; % max [val1,id...

circa 23 ore ago | 0

| accepted

Answered

loop to count amount sin(x)>0.5 when 1>x>1000

To get what you want loop is not required. x = linspace(1,1000,10^5) ; y = sin(x) ; nnz(y>0.5) If you want loop: % loo...

loop to count amount sin(x)>0.5 when 1>x>1000

To get what you want loop is not required. x = linspace(1,1000,10^5) ; y = sin(x) ; nnz(y>0.5) If you want loop: % loo...

circa 23 ore ago | 0

| accepted

Answered

Can you solve this??

You can read about roots, solve. I suggest you to read the function roots.

Can you solve this??

You can read about roots, solve. I suggest you to read the function roots.

1 giorno ago | 0

Answered

Subscript indices must either be real positive integers or logicals.

clc close all clear all n=5; axis([0 100 0 100]) [p]=ginput(n) c=[]; f=[]; T=0:0.0001:1 ; for i = 1:length(T) % change...

Subscript indices must either be real positive integers or logicals.

clc close all clear all n=5; axis([0 100 0 100]) [p]=ginput(n) c=[]; f=[]; T=0:0.0001:1 ; for i = 1:length(T) % change...

1 giorno ago | 0

Answered

How to reshape and rearrange a matrix in a specific way

If A is matrix. USe iwant = A(:) Example: A = [0, 0; -0.001, 0; 0, 0.02] ; A = A' ; iwant = A(:)

How to reshape and rearrange a matrix in a specific way

If A is matrix. USe iwant = A(:) Example: A = [0, 0; -0.001, 0; 0, 0.02] ; A = A' ; iwant = A(:)

1 giorno ago | 0

| accepted

Answered

how to empty cell from excel and [] those bracket also

If C is your cell array..to remove empty cells: C = C(~cellfun('isempty',C)) ;

how to empty cell from excel and [] those bracket also

If C is your cell array..to remove empty cells: C = C(~cellfun('isempty',C)) ;

1 giorno ago | 0

Answered

Index exceed number of elements when using data from an excel table

for i=1:length(t) fprintf(' %12s ',t{i}) end for i=1:length(p) fprintf(' %15s \n ',p{i}) end

Index exceed number of elements when using data from an excel table

for i=1:length(t) fprintf(' %12s ',t{i}) end for i=1:length(p) fprintf(' %15s \n ',p{i}) end

1 giorno ago | 1

| accepted

Answered

How to solve a nonliner equation ?

If you want o find the intersection, you can use this: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersect...

How to solve a nonliner equation ?

If you want o find the intersection, you can use this: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersect...

1 giorno ago | 0

Answered

How to concatenate matrices to calculate mean

Let A be your matrix.....use iwant = mean(A,3) ;

How to concatenate matrices to calculate mean

Let A be your matrix.....use iwant = mean(A,3) ;

1 giorno ago | 0

Answered

Find minimum points matlab

subs(d1,res) You will get it as zero.....so the value x = 2 is a root to d1. Also your d1 = 2*x-4. On solving manually 2*...

Find minimum points matlab

subs(d1,res) You will get it as zero.....so the value x = 2 is a root to d1. Also your d1 = 2*x-4. On solving manually 2*...

1 giorno ago | 0

Answered

how to count the number of terms in syms

You can get the number of sym variables present in the work spce using: s = whos ; iwant = nnz(strcmp({s(:).class},'sym'))

how to count the number of terms in syms

You can get the number of sym variables present in the work spce using: s = whos ; iwant = nnz(strcmp({s(:).class},'sym'))

1 giorno ago | 0

Answered

basic error, help me

x = linspace(20,100000); y = 20*log10(1./(1+(2*3.14*x*985.1*(59*10.^-9)-(985.1./(2*3.14*x*(4.7*10.^-3))).^2).^0.5)); plot(x,y...

basic error, help me

x = linspace(20,100000); y = 20*log10(1./(1+(2*3.14*x*985.1*(59*10.^-9)-(985.1./(2*3.14*x*(4.7*10.^-3))).^2).^0.5)); plot(x,y...

1 giorno ago | 0

Answered

How to write a script function matlab called myflip?

x = rand(1,10 ) ; xr = x ; n = length(x) ; for i = 1:n i xr(i) = x(n-i+1) ; end xr

How to write a script function matlab called myflip?

x = rand(1,10 ) ; xr = x ; n = length(x) ; for i = 1:n i xr(i) = x(n-i+1) ; end xr

1 giorno ago | 0

Answered

How to extract data from 3D matrix using shape file

Your lon, lat are already matrices...you need not to use meshgrid. You are creating unnecessary data. lon = squeeze(filelon) ;...

How to extract data from 3D matrix using shape file

Your lon, lat are already matrices...you need not to use meshgrid. You are creating unnecessary data. lon = squeeze(filelon) ;...

1 giorno ago | 0

Answered

colorplot of 3 columns

x = A(:,1) ; y = A(:,2) ; z = A(:,3) ; %%structured xi = unique(x) ; yi = unique(y) ; [X,Y] = meshgrid(xi,yi) ; Z = reshape...

colorplot of 3 columns

x = A(:,1) ; y = A(:,2) ; z = A(:,3) ; %%structured xi = unique(x) ; yi = unique(y) ; [X,Y] = meshgrid(xi,yi) ; Z = reshape...

1 giorno ago | 0

Answered

Triangular plot, Plotting, MATLAB, Ternary plot, color plot, Contour map

Let A be your m*3 column array. Try this: x = A(:,1) ; y = A(:,2) ; z = A(:,3) ; %%structured xi = unique(x) ; yi = unique...

Triangular plot, Plotting, MATLAB, Ternary plot, color plot, Contour map

Let A be your m*3 column array. Try this: x = A(:,1) ; y = A(:,2) ; z = A(:,3) ; %%structured xi = unique(x) ; yi = unique...

1 giorno ago | 0

Answered

Error: Unable to perform assignment because the left and right sides have a different number of elements.

for a = 1: (N-1) vf(a+1) = ((-g)+((p-A*a)*(vol*g)/m)-((b*vf(a))/m))*dt+vf(a); end

Error: Unable to perform assignment because the left and right sides have a different number of elements.

for a = 1: (N-1) vf(a+1) = ((-g)+((p-A*a)*(vol*g)/m)-((b*vf(a))/m))*dt+vf(a); end

1 giorno ago | 0

Answered

calculating simple 2 equations with matlab. give me matlab code please~~

That is pretty simple.....I will give some demo example..you have to extend it to your case. Say got give f I want to find y =...

calculating simple 2 equations with matlab. give me matlab code please~~

That is pretty simple.....I will give some demo example..you have to extend it to your case. Say got give f I want to find y =...

2 giorni ago | 0

| accepted

Answered

matrix dimensions are not equal

Read about strcat. If str is your string of size 1*2...to append zero at tne end use: iwant1 = strcat(str,'0') % option 1 i...

matrix dimensions are not equal

Read about strcat. If str is your string of size 1*2...to append zero at tne end use: iwant1 = strcat(str,'0') % option 1 i...

2 giorni ago | 0

Answered

How to compare two variables data by using ifelse? if both variable contain same number and length of data, so condition becomes true it should perform desired functionality.

Read about isequal. a = -6:6; b = -3:3; c = 0:6; d = 0:12; % data = [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6] % user selected dat...

How to compare two variables data by using ifelse? if both variable contain same number and length of data, so condition becomes true it should perform desired functionality.

Read about isequal. a = -6:6; b = -3:3; c = 0:6; d = 0:12; % data = [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6] % user selected dat...

2 giorni ago | 0

| accepted

Answered

Simple question loop for

Lear debugging code. It will be help ful for you and easy. https://in.mathworks.com/help/matlab/matlab_prog/debugging-proces...

Simple question loop for

Lear debugging code. It will be help ful for you and easy. https://in.mathworks.com/help/matlab/matlab_prog/debugging-proces...

2 giorni ago | 0