Community Profile

# ANKUR KUMAR

### National Institute of Technology, Rourkela

205 total contributions since 2017

Ankur Kumar, a student of National Institute of Technology, Rourkela is doing his masters degree in Atmospheric Sciences in the Department of Earth and Atmospheric Science.
Ankur is also an author of best selling novel, "The Emotions" which one can read from Amazon.
https://www.amazon.in/Emotions-Ankur-Kumar/dp/9385783149

View details...

Contributions in
View by

How do i filter out certain values in a cell matrix using conditions for strings ?
You can use _contains_ to find the required letter. _contains_ gives true if the part of search string contains in the main stri...

1 month ago | 1

| accepted

The size of X must match the size of Z or the number of columns of Z.
There are few mistakes I want to highlight. You have used, contour(lat,lon,z............. It should be contour(lon...

1 month ago | 0

| accepted

How do I efficiently find the mean and covariance of a cell containing matrices with different rows?
Use concatenate to mix up all cells into one matrix. cat(2,C{:}); %you can use this only if number of rows must be same in ...

1 month ago | 0

| accepted

How to present OBJ file (read as a mesh file) in a contour plot?
An example of creating a mesh is here, [X,Y] = meshgrid(-5:.2:5); R = sqrt(X.^2 + Y.^2); Z = sin(R)./R; mesh(X,Y,Z...

1 month ago | 0

Placing multiple rectangles layout
figure rectangle('Position',[1 1 2 4],'Curvature',0) rectangle('Position',[5 2 4 3],'Curvature',0) rectangle('Positio...

1 month ago | 0

Shapefile distorted on World Map
"I'm not sure if it is an issue with my shapefiles or with how I'm projecting". Its only because of projection, the continen...

1 month ago | 0

Remove Data Outside Range
AA=temp(temp(:,1)>=4 & temp(:,1)<=20,:); There is no need to remove. Directly store the numbers which you need. [xx,yy...

1 month ago | 0

| accepted

interp and interp3 give different size arrays
x0 = 1:100; y0 = 1:90; z0 = 1:100; data1=randi(10,90,100,100); %defining data over coarser resolution dimen...

1 month ago | 1

| accepted

Animation using plot inside for loop
clc clear h=figure for n = 1:10 x_origin = 0; y_origin = 0; x_bob = 0.75*sin(n); y_bob = ...

1 month ago | 0

Creating a report file in txt format and merging it with created text file

1 month ago | 0

Counting occurrences of each column in a matrix
Since you have not given any sample data, I am taking some random data. A=randi(50,50,50); A(A<=25)=0.4; A(A>25)=0.6;...

1 month ago | 0

| accepted

Reading very heavy .txt files and writing into .xlsx
A=randi(10,50,50); %a random matrix to store in excel file xlswrite('sample.xlsx',A,'sheet1','A1') You can use 'sheet1' ...

1 month ago | 0

Solved

Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

1 month ago

Solved

Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

1 month ago

Height and width of an image
Try this, A=imread('testing.jpg'); AA=rgb2gray(A); len=max(arrayfun(@(x) length(find(AA(:,x)~=255)),1:800)) bred=m...

1 month ago | 0

| accepted

How to Write Output Figure with Table inside to Excel
"I have an image output with a table on my code" You can directly write this table in excel using xlswrite. A=randi(10,5...

1 month ago | 0

Logarithmic color scale in 2d histogram
Use ruler.scale to set log axis in colorbar. contourf(randi(1000,25,25)) cx= colorbar(); cx.Ruler.Scale = 'log'; c...

1 month ago | 0

Since you have not attached any sample file, I am giving you an example with a attached file. A=importdata('sample.txt'); ...

1 month ago | 0

| accepted

Solved

Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

1 month ago

Solved

Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

1 month ago

Solved

Read a column of numbers and interpolate missing data
Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

1 month ago

If statement with many logical or.
Write statement inside of the loop for a1 = 0.4 : 0.1 : 1 for b1 = 0.2 : 0.1 : 1 if (a1 == b1 && b1 > 1-a...

1 month ago | 0

Sorting content of table columns
I am giving an example to explain. clc clear load patients T = table(Gender,Age,Height,Weight,Smoker,Systolic,Dias...

1 month ago | 1

| accepted

how to read multiple mat files and and extract data from those
Whenever you wish to load all files, just use dir. F=dir('*.mat') for i =1:length(F) load(F(i).name) end

1 month ago | 0

How can i plot graphs?
"How can i plot graphs?" Here is the sample program of plotting multiple lines in matlab. clc clear var1=rand(1...

1 month ago | 0

| accepted

how can i read large data in loop
F=dir('*.edf') for i=1:length(F) [data1, header] = ReadEDF(F(i).name); %do you usual calculation ...

1 month ago | 0

| accepted

Solved

Is my wife right?
Regardless of input, output the string 'yes'.

1 month ago

Solved

Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

1 month ago

Question

Am I doing something wrong in cody submission?
I have solved couple of question on cody and cross checked my prog on matlab which showing exactly the same output which the que...

1 month ago | 1 answer | 0