Solved


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

1 year ago

Solved


Max of a Vector
Write a function to return the max of a vector

1 year ago

Solved


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

1 year ago

Solved


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

1 year ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average as follows Example [1 2 3] and [10 15 20] should result in 33.3...

1 year ago

Solved


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

1 year ago

Solved


Magic!
Check whether the input matrix is a normal magic square: <http://en.wikipedia.org/wiki/Magic_square> Output the logical va...

1 year ago

Solved


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

1 year ago

Solved


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

1 year 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

1 year ago

Solved


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

1 year ago

Solved


kmph to mps
convert kilometer per hour to meter per second

1 year ago

Solved


Simple equation: Annual salary
Given an hourly wage, compute an annual salary

1 year ago

Solved


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

1 year ago

Solved


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

1 year ago

Solved


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

1 year ago

Solved


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

1 year ago

Solved


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

1 year ago

Solved


Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

1 year ago

Solved


Getting the row and column location from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get <http://www.mathwo...

1 year ago

Solved


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

1 year ago

Solved


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

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

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

1 year ago

Solved


Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

1 year ago

Solved


reverse string
input='rama' output='amar'

1 year ago

Solved


Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'

1 year ago

Solved


Determine the length of a string of characters
Determine the length of a string of characters

1 year ago

Solved


Array of Ones
Create a 100 X 100 array of ones.

1 year 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

1 year ago

Load more