Solved


y equals x divided by 2
function y = x/2

11 years ago

Solved


Sum of integers numbers
Sum of the numbers from 1 to 100

11 years ago

Solved


Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

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

11 years ago

Solved


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

11 years ago

Solved


square number
Square a number

11 years ago

Solved


Alkane
Given a number, x, that is equal to the number of carbons in an alkane, find, y, the number of hydrogens in the alkane.

11 years ago

Solved


Where is she?
Given the numbers 12, 3 , 6 ,9 Tell where the girl is located. I.E: Look to your 3 oclock = look right Ex. x = 3 fp...

11 years ago

Solved


Combination logic
Create an algorithm in MATLAB that calculate the combination for the given positive integers n and k as inputs. When k > n, the ...

11 years ago

Solved


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

11 years ago

Solved


Palindrome
Given a string or array, determine whether the it is a palindrome.

11 years ago

Solved


Skip by a multiple
Given an integer create an array of its multiples. Array must have a length of 15

11 years ago

Solved


Decide whether determinant is zero.
Given a 3 x 3 matrix, find the determinant. Let y = true if the determinant is zero, and let y = false if the determinant is no...

11 years ago

Solved


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

11 years ago

Solved


Interior angles
Find the sum of interior angles for polygon of x sides.

11 years ago

Solved


Convert number from given base to other base
Convert number from given base to other base. Example 400 in base 5, find equivalent number in base 8, it is 144.

11 years ago

Solved


Find difference of two set as per example
Find difference of two set as per example Say x=[1:5] and y=[2:6] then, set_diff(x,y) should give output[1] and set_diff(y...

11 years ago

Solved


Collaborative Fun : Nomination
Series of problems have been presented in Cody aiming at collaborative fun. This problem is based on Alfonso's problem #2825 - P...

11 years ago

Solved


Area of a rectangle
Find the area of a rectangle with sides a and b

11 years ago

Solved


Golden ratio
Calculate the golden ratio. Hint: phi^2 = phi + 1.

11 years ago

Solved


Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...

11 years ago

Solved


Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

11 years ago

Solved


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

11 years ago

Solved


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

11 years ago

Solved


Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

11 years ago

Solved


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

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

11 years ago

Solved


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

11 years ago

Solved


Matlab Basics - Set unwated parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. e.g. x = [1 2 3 4 5 6 7] --> x = [1 ...

11 years ago

Solved


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

11 years ago

Load more