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

Professional Interests: Mathematical Computing

Answered

I can’t get the program to run for some reason. I want to use for loops for this program.

You need not to use two for loops.....that is a wrong idea. This is what you should do: Ti = 0; Tinc = pi/180; Tf = pi...

I can’t get the program to run for some reason. I want to use for loops for this program.

You need not to use two for loops.....that is a wrong idea. This is what you should do: Ti = 0; Tinc = pi/180; Tf = pi...

ungefär 18 timmar ago | 0

Answered

need Matlab program to count the number of lines until dollar sign is given

Read about strfind. YOu can search for you string using this.

need Matlab program to count the number of lines until dollar sign is given

Read about strfind. YOu can search for you string using this.

ungefär 18 timmar ago | 0

Answered

Single line of code for vectorization, Need Help!!

r = [0.1 0.2 0.3 0.4 0.5] ; h = [0.2 0.3 0.4 0.5] ; [r,h] = meshgrid(r,h) ; v = 1/3*pi*r.^r.*h ;

Single line of code for vectorization, Need Help!!

r = [0.1 0.2 0.3 0.4 0.5] ; h = [0.2 0.3 0.4 0.5] ; [r,h] = meshgrid(r,h) ; v = 1/3*pi*r.^r.*h ;

ungefär 19 timmar ago | 0

Answered

How do you detect duplicate values within a random array?

If you want to use inbuilt functions......you can use unique. Read about it. Let A be your array. B = unique(A) ; if lengt...

How do you detect duplicate values within a random array?

If you want to use inbuilt functions......you can use unique. Read about it. Let A be your array. B = unique(A) ; if lengt...

ungefär 20 timmar ago | 0

| accepted

Answered

Plotting question using data (water saturation)

sat_data = water_sattemp_data ; plot(sat_data(:,1),sat_data(:,2)) ;

Plotting question using data (water saturation)

sat_data = water_sattemp_data ; plot(sat_data(:,1),sat_data(:,2)) ;

ungefär 20 timmar ago | 0

Answered

Adding Array elements from one element to another

Let A be your array. iwant = sum(A(487146:513795)) ;

Adding Array elements from one element to another

Let A be your array. iwant = sum(A(487146:513795)) ;

ungefär 21 timmar ago | 0

| accepted

Answered

Identifying the circle that fits the outer white pixels in a binary image (or make external mask)

I = imread("SampleXRmorph.PNG"); [y,x] = find(I) ; % Get center of cricle C = [mean(x) mean(y)] ; % GEt raidus d = sqrt...

Identifying the circle that fits the outer white pixels in a binary image (or make external mask)

I = imread("SampleXRmorph.PNG"); [y,x] = find(I) ; % Get center of cricle C = [mean(x) mean(y)] ; % GEt raidus d = sqrt...

5 dagar ago | 1

| accepted

Answered

How to fill the area between contour line and upper bound.

Get your required curve/ line coordinates; form a closed polygon and use patch/ area.

How to fill the area between contour line and upper bound.

Get your required curve/ line coordinates; form a closed polygon and use patch/ area.

5 dagar ago | 1

Answered

How to divide vector to matrix(same row and column)

To remove extra elements and convert to square matrix A = rand(82580526,1) ; l = length(A) ; % GEt the nearest perfect squ...

How to divide vector to matrix(same row and column)

To remove extra elements and convert to square matrix A = rand(82580526,1) ; l = length(A) ; % GEt the nearest perfect squ...

5 dagar ago | 0

| accepted

Answered

Plotting user inputs in a 2D plot

prompt = 'Enter any number that you like:'; %{ I only want the user to enter a maximum of 10 numbers. %} N = 10 ; figure...

Plotting user inputs in a 2D plot

prompt = 'Enter any number that you like:'; %{ I only want the user to enter a maximum of 10 numbers. %} N = 10 ; figure...

6 dagar ago | 0

| accepted

Answered

2D plot of a matrix

Read about importdata to load the data into MATLAB. You can normalize an array x to [0,1] using: norm_x = (x-min(x))/(max(x)-...

2D plot of a matrix

Read about importdata to load the data into MATLAB. You can normalize an array x to [0,1] using: norm_x = (x-min(x))/(max(x)-...

7 dagar ago | 0

| accepted

Answered

how to write a for loop in this case?

daily_tmax = cell(length(tmax),1) ; for i = 1:length(tmax) daily_tmax{i} = squeeze(mean(reshape(tmax{i}, size(tmax{i}, 1)...

how to write a for loop in this case?

daily_tmax = cell(length(tmax),1) ; for i = 1:length(tmax) daily_tmax{i} = squeeze(mean(reshape(tmax{i}, size(tmax{i}, 1)...

7 dagar ago | 1

| accepted

Answered

Read spesific rowintervals from .txt file and store them

I = [12 40 68] ; iwant = cell(length(I),1) ; for i = 1:length(I) C = textscan(fid,'%.6f %.6f',npoints,'delimiter','\n',...

Read spesific rowintervals from .txt file and store them

I = [12 40 68] ; iwant = cell(length(I),1) ; for i = 1:length(I) C = textscan(fid,'%.6f %.6f',npoints,'delimiter','\n',...

7 dagar ago | 0

Answered

How do I plot a line graph from scatter plot?

clc clear all A = 0.05; l_r = 2; %Wave length of the road v = 45; %Speed(m/s) P = l_r/v; %Period %Om = 1/P*2*pi; %Forcin...

How do I plot a line graph from scatter plot?

clc clear all A = 0.05; l_r = 2; %Wave length of the road v = 45; %Speed(m/s) P = l_r/v; %Period %Om = 1/P*2*pi; %Forcin...

8 dagar ago | 1

| accepted

Answered

For loop using strings

Let A be your data of size m*3. for i = 1:3 [pks_x_sit1,locs_x_sit1] = findpeaks(A(:,i),'MinPeakHeight',1.25); nr_...

For loop using strings

Let A be your data of size m*3. for i = 1:3 [pks_x_sit1,locs_x_sit1] = findpeaks(A(:,i),'MinPeakHeight',1.25); nr_...

8 dagar ago | 0

| accepted

Answered

How to graph using a for loop

YOu need not use a loop as the other user has suggested you. If you use a loop, you need to intiilaize the array and save it in ...

How to graph using a for loop

YOu need not use a loop as the other user has suggested you. If you use a loop, you need to intiilaize the array and save it in ...

8 dagar ago | 1

| accepted

Answered

How to get all values existing in arrays/matrices?

Read about unique a = myArray(:) ; [cnt_unique, unique_a] = hist(a,unique(a)) ;

How to get all values existing in arrays/matrices?

Read about unique a = myArray(:) ; [cnt_unique, unique_a] = hist(a,unique(a)) ;

8 dagar ago | 1

Answered

In an image to set reference coordinate and get coordinates of color points .

If I is your matrix of image ..use [y,x] = find(I==val) ; where val is your pixel value you want. If I is m*n*3 RGB image....

In an image to set reference coordinate and get coordinates of color points .

If I is your matrix of image ..use [y,x] = find(I==val) ; where val is your pixel value you want. If I is m*n*3 RGB image....

8 dagar ago | 0

| accepted

Answered

Create random paths between two known points in 3D

A = [0,0,0] ; B = [1,1,1] ; N = 10 ; x = (B(1)-A(1)).*rand(N) + A(1); y = (B(2)-A(2)).*rand(N) + A(2); z = (B(3)-A(3)).*...

Create random paths between two known points in 3D

A = [0,0,0] ; B = [1,1,1] ; N = 10 ; x = (B(1)-A(1)).*rand(N) + A(1); y = (B(2)-A(2)).*rand(N) + A(2); z = (B(3)-A(3)).*...

10 dagar ago | 0

Answered

how to detect border irregularity?

If (x,y) are your boundary points. % Get bounding box x0 = min(x) ; x1 = max(x) ; y0 = min(y) ; y1 = max(y) ; % A = [...

how to detect border irregularity?

If (x,y) are your boundary points. % Get bounding box x0 = min(x) ; x1 = max(x) ; y0 = min(y) ; y1 = max(y) ; % A = [...

12 dagar ago | 0

Answered

Unable to perform assignment because the indices on the left side are not compatible with the size of the right side. Error in Q38 (line 10) Mat(row,col)=t1

You have to intilize them either as a cell or matrix. I am intializing as cell. check below: %Questions#38 clc clear close ...

Unable to perform assignment because the indices on the left side are not compatible with the size of the right side. Error in Q38 (line 10) Mat(row,col)=t1

You have to intilize them either as a cell or matrix. I am intializing as cell. check below: %Questions#38 clc clear close ...

13 dagar ago | 0

Answered

What is difference between indexing using ".var" and "{}"?

.var is to access fields of structures. {} is to access cells. Read about structures and cells.

What is difference between indexing using ".var" and "{}"?

.var is to access fields of structures. {} is to access cells. Read about structures and cells.

13 dagar ago | 0

Answered

I want someone who can help me to see a grid and airfoil in the same plot , here is my code

clear all; close all; clc; Mi=0.5; T=300; P=1; gamma = 1.4; R=287; vinf = sqrt(gamma*R*T)*Mi; Nx = 100; % x ...

I want someone who can help me to see a grid and airfoil in the same plot , here is my code

clear all; close all; clc; Mi=0.5; T=300; P=1; gamma = 1.4; R=287; vinf = sqrt(gamma*R*T)*Mi; Nx = 100; % x ...

14 dagar ago | 0

| accepted

Answered

How to quickly find the first non-zero element without iterations in all columns in a sparse matrix?

[val,id] = min(abs(A)) ; Use the minimum function.

How to quickly find the first non-zero element without iterations in all columns in a sparse matrix?

[val,id] = min(abs(A)) ; Use the minimum function.

14 dagar ago | 0

Answered

Cannot plot iterations.

clear all ; clc; t=20:30;%range of inital velocities plotted dt = min(diff(t)) ; g = 9.81 ; figure; hold on for i=20:3...

Cannot plot iterations.

clear all ; clc; t=20:30;%range of inital velocities plotted dt = min(diff(t)) ; g = 9.81 ; figure; hold on for i=20:3...

15 dagar ago | 0

| accepted

Answered

How to take two inputs simultaneously from the user ?

x=input('Enter range of x :'); xf1 = x(1) ; xf2 = x(2) ; Also have a look on deal.

How to take two inputs simultaneously from the user ?

x=input('Enter range of x :'); xf1 = x(1) ; xf2 = x(2) ; Also have a look on deal.

15 dagar ago | 0

| accepted

Answered

Having a problem with for loops. In the given code I need to store the 4 values in 4 seperate places like x1,x2,x3,x4, is this the correct way to write it ? and if my xf is defines in linspace then I'm having a error that the indices aren't compatib

x = rand(1,4) ; % your four values goes here x(1) % x1 x(2) % x2 x(3) % x3 x(4) % x4

Having a problem with for loops. In the given code I need to store the 4 values in 4 seperate places like x1,x2,x3,x4, is this the correct way to write it ? and if my xf is defines in linspace then I'm having a error that the indices aren't compatib

x = rand(1,4) ; % your four values goes here x(1) % x1 x(2) % x2 x(3) % x3 x(4) % x4

15 dagar ago | 0

| accepted