Community Profile

kaatil_coder

Last seen: 1 day ago
1,321 total contributions since 2020

Bachelor's student in Civil Engineering at IIT(BHU)

View all

Contributions in
View by

Solved

Find the position of planet in solarsystem
Write a funtion named *nthplanet* which takes name of the planet as input string and provides the position of the planet, starti...

21 hours ago

Solved

sumdigits
function [p1,p2] = goldbach(n) for p1 = 1:n if isprime(p1) p2 = n - p1; if isprime(p2) re...

22 hours ago

Solved

Cull vector elements that contain a specified digit
Given inputs of (1) a row vector and (2) a digit, identify the elements of that vector that contain the digit, remove them, and ...

22 hours ago

Solved

length of a vector
Find twice the length of a given vector.

4 days ago

Solved

Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

4 days ago

Solved

Calculate cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

11 days ago

Solved

Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

11 days ago

Solved

pizza deals
Given two pizza slices of different sizes: * Slice A with angle alpha1, radius r1, and price p1 * Slice B with angle alpha2,...

11 days ago

Solved

'Determine if array of numbers is odd'
Return true if the input single number is odd. If the input is a vector, it will return a vector or array of logical values indi...

11 days ago

Solved

How do you make seven even?
Take away the s.

11 days ago

Solved

Translate German decimals to English decimals
The string 'x = [2,5; 5,5; 4,3];' should return 'y = [2.5; 5.5; 4.3];'

11 days ago

Solved

Replace Nan!
Replace Nan in the given vector(v) with 9999.

11 days ago

Solved

Let's make puddings !
We will make puddings with eggs, milk and sugar. To make one pudding, we need one egg, 140(cc) of milk, 15 (g) of sugar. Now W...

11 days ago

Solved

Please check if calorie intake is less than 300 kcal.
I like eating some puddings and some chocolate cookies around 3 o'clock. However, I care about calorie intake. Please check whe...

11 days ago

Solved

The proportion of NaN in the data
If NaN occupies less than half of the input data, return 1, otherwise return 0. eg. input x = [1 2 NaN ; 4 NaN 6] >>> out...

11 days ago

Solved

The average of the second largest values
Given a matrix, find the average of the second largest values in each row. The same value does not exist on a row. Example: ...

11 days ago

Solved

We have data of matrix, that is input. That contains 2 or more rows and the last row should contain the average of each column,...

11 days ago

Solved

I hope to lose weight healthily...
In order to reduce weight healthily, weight will be reduced by 4% every month. Please calculate how many months it will take...

11 days ago

Solved

Add 3 to every element. However, if the value is greater than 100, subtract 100 and add 3. eg. input x = [45 106; 67 1...

11 days ago

Solved

The great 82-year-old
Let's answer the question below; 'I am *x* years old and I have never written programs. If I study from now, will I be able ...

11 days ago

Solved

Shift elements of vector left
Shift elements of vector to the left. For ex. : Input_vec = [1 2 3 4 5] Output_vec = [2 3 4 5 1]

11 days ago

Solved

Capitalized string operations
Convert the input sentence to upper case and replace all vowels with an underscore ('_')

11 days ago

Solved

find number of times of occurrence of the most frequent number in a row vector
In a given row vector, find the number of times a mode of a row vector has occurred example: in [2 5 5 5 5 3], output is 4 ...

11 days ago

Solved

Check if there are white spaces in the input string
If there are white spaces in the input string, output=1 else 0

11 days ago

Solved

Repetition of matrices
*A is a bold matrix: [1 2 3; 4 5 6;7 8 9]* Given an integer 'n' , a matrix B exists such that has n copies of A in the row an...

12 days ago

Solved

Product of all elements in an array
Compute the product of all elements in an array.

12 days ago

Solved

count upper and lower case characters
In a given input string, count and return the number of upper and lower case characters as u and l respectively. For example:...

12 days ago

Solved

Nth root of a number
Given an input and a number N, find the Nth root of the number(s)

12 days ago

Solved

replace empty matrices with '[]'
for example a=1;a(:,1)=[]; returns a = Empty matrix: 1-by-0 use this as the input,and the output should be '[]...

12 days ago