Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


square number
Square a number

mehr als 11 Jahre vor

Gelöst


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.

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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.

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Mehr laden