Solved

Product of elements in row
Product of matrix such that a=[3 3 1] b=9

6 years ago

Solved

Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

6 years ago

Solved

Find the position of first minimum value in an integer array with numbers
If x = [2 6 4 9 10 3 1 5 1] the the output should be 7, because the first minimum value (1) lies at the 7th position.

6 years ago

Solved

Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

6 years ago

Solved

Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

6 years ago

Solved

Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

6 years ago

Solved

Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

6 years ago

Solved

Output a vector which is table of 9
Output a vector which is table of 9

6 years ago

Solved

Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

6 years ago

Solved

"Find out the best cricket"
This is how I originally read Problem 2013, so let's just go with it. Give me the first and last name of the best cricket, rega...

6 years ago

Solved

Find Factrorial without using built-in function
A number is given, you have to find the factorial of the number without using built-in factroial function. You may use loops....

6 years ago

Solved

square root
Find the square root (y) of an input (x).

6 years ago

Solved

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...

6 years ago

Solved

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,...

6 years ago

Solved

Remove the positive integers.
Given array,x, remove all the positive numbers and display ouput as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

6 years ago

Solved

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 ...

6 years ago

Solved

factorial of a number x
Factorial of a number x

6 years ago

Solved

Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

6 years ago

Solved

Matlab Basics II - Velocity of a particle
A particle is moving in space, such that it's velocity is given by: <<http://s30.postimg.org/5rf1xtvj5/cody1.png>> write a...

6 years ago

Solved

Calculate square and cube of number
Calculate square and cube of number x

6 years ago

Solved

Variable Assignment
Complete the ? part by assigning myExamScore with 100.

6 years ago

Solved

Matlab Basics - Assigning Variables
Assign different types of data to variables: integer, double, and strings Example: A is a double, for example 2.34 B is a...

6 years ago

Solved

Saving MATLAB session to a file
How to save MATLAB session to a file?

6 years ago

Solved

Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

6 years ago

Solved

find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

6 years ago

Solved

construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

6 years ago

Solved

Prime checker
Complete the recursive function to determine if a number is prime. Skeletal code is provided in the PrimeChecker function.

6 years ago

Solved

Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

6 years ago

Solved

Times 3 problem
When you enter the number, it should return the number multiplied by 3

6 years ago

Solved

Generate a string like abbcccddddeeeee
This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

6 years ago