Gelöst


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

mehr als ein Jahr vor

Gelöst


Square root of a number
Write a code that will output the square root of x.

mehr als ein Jahr 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 ein Jahr vor

Gelöst


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

mehr als ein Jahr vor

Gelöst


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

mehr als ein Jahr vor

Gelöst


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

mehr als ein Jahr vor

Gelöst


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

mehr als ein Jahr vor

Gelöst


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

mehr als ein Jahr vor

Gelöst


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

mehr als ein Jahr vor

Gelöst


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

mehr als ein Jahr vor

Gelöst


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

mehr als ein Jahr vor

Gelöst


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

mehr als ein Jahr vor

Gelöst


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

mehr als ein Jahr vor

Gelöst


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

mehr als ein Jahr vor

Gelöst


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

mehr als ein Jahr vor

Gelöst


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

mehr als ein Jahr vor

Gelöst


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

mehr als ein Jahr vor

Gelöst


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

mehr als ein Jahr vor

Gelöst


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

mehr als ein Jahr vor

Gelöst


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

mehr als ein Jahr vor

Gelöst


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

mehr als ein Jahr vor

Gelöst


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

mehr als ein Jahr vor

Gelöst


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

mehr als ein Jahr vor

Gelöst


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt)*cos(2πft)| where |A|, |λ|, and |f| ...

mehr als ein Jahr vor

Gelöst


Is my wife right?
Regardless of input, output the string 'yes'.

mehr als ein Jahr vor

Mehr laden