Gelöst


ascii value
let input='a' output=97

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

etwa 10 Jahre vor

Gelöst


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

etwa 10 Jahre vor

Gelöst


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

etwa 10 Jahre vor

Gelöst


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

etwa 10 Jahre vor

Gelöst


Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

etwa 10 Jahre vor

Gelöst


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

etwa 10 Jahre vor

Gelöst


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

etwa 10 Jahre vor

Gelöst


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

etwa 10 Jahre vor

Gelöst


Pizza value using expression with parentheses
Pizza prices are typically listed by diameter, rather than the more relevant feature of area. Compute a pizza's value (cost per ...

etwa 10 Jahre vor

Gelöst


Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.

etwa 10 Jahre vor

Gelöst


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

etwa 10 Jahre vor

Gelöst


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

etwa 10 Jahre vor

Gelöst


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

etwa 10 Jahre vor

Gelöst


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

etwa 10 Jahre vor

Gelöst


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

etwa 10 Jahre vor

Gelöst


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

etwa 10 Jahre vor

Gelöst


Let's get back to school, and create multiplication tables
For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

etwa 10 Jahre vor

Gelöst


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

etwa 10 Jahre vor

Gelöst


Do Fast Fourier Transformation
Example Fast Fourier Transformation from vector [2,1]) ans = 3 1

etwa 10 Jahre 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...

etwa 10 Jahre vor

Gelöst


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

etwa 10 Jahre vor

Gelöst


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

etwa 10 Jahre vor

Gelöst


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

etwa 10 Jahre vor

Gelöst


radius of a spherical planet
you just measured its surface area, that is the input.

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

etwa 10 Jahre vor

Gelöst


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

etwa 10 Jahre vor

Gelöst


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

etwa 10 Jahre vor

Mehr laden