Feeds
已解决
Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not count...
3 years 前
已解决
Finding peaks
Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...
3 years 前
已解决
Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.
3 years 前
已解决
Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.
3 years 前
已解决
"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...
3 years 前
已解决
Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]
3 years 前
已解决
Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...
3 years 前
已解决
Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...
3 years 前
已解决
matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...
3 years 前
已解决
Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.
3 years 前
已解决
Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...
3 years 前
已解决
Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...
3 years 前
已解决
Area of a Square
Inside a square is a circle with radius r. What is the area of the square?
3 years 前
已解决
Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...
3 years 前
已解决
multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...
3 years 前
已解决
Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively
3 years 前
已解决
Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0
3 years 前
已解决
surface of a spherical planet
you just discovered its circumference, that is the input.
3 years 前
已解决
Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.
3 years 前
已解决
Sum of Two Numbers
Given two integer numbers x and y, calculate their sum and put it in z. Examples: Inputs x = 2, y = 4 Output z is 6 ...
3 years 前
已解决
Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] ...
3 years 前
已解决
Find out total non zero element of matrix
Find out Non zero element of matrix A=magic(5) 17 24 1 8 15 23 5 7 14 16 4 6...
3 years 前
已解决
Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...
3 years 前
已解决
BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...
3 years 前
已解决
Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...
3 years 前
已解决
What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...
3 years 前


