A résolu


Area of rhombus
Calculate the rhombus area

plus de 5 ans il y a

A résolu


Add two numbers
Add two numbers (For beginners)

plus de 5 ans il y a

A résolu


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

plus de 5 ans il y a

A résolu


Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

plus de 5 ans il y a

A résolu


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

plus de 5 ans il y a

A résolu


03 - Matrix Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3a.png>> A 9x9 matrix full of 2's (Hint: use *ones* o...

plus de 5 ans il y a

A résolu


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

plus de 5 ans il y a

A résolu


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

plus de 5 ans il y a

A résolu


Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

plus de 5 ans il y a

A résolu


Negative matrix
Change the sign of all elements in given matrix.

plus de 5 ans il y a

A résolu


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

plus de 5 ans il y a

A résolu


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

plus de 5 ans il y a

A résolu


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

plus de 5 ans il y a

A résolu


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

plus de 5 ans il y a

A résolu


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]

plus de 5 ans il y a

A résolu


sum of non-primes
The sum of the non-primes no larger than 10 is 1+4+6+8+9+10=38 Find the sum of all the positive non-prime integers that do no...

plus de 5 ans il y a

A résolu


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

plus de 5 ans il y a

A résolu


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

plus de 5 ans il y a

A résolu


Reverse a matrix
Its simple. You have to reverse a given matrix.

plus de 5 ans il y a

A résolu


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

plus de 5 ans il y a

A résolu


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

plus de 5 ans il y a

A résolu


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

plus de 5 ans il y a

A résolu


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

plus de 5 ans il y a

A résolu


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

plus de 5 ans il y a

A résolu


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]

plus de 5 ans il y a

A résolu


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

plus de 5 ans il y a

A résolu


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

plus de 5 ans il y a

A résolu


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

plus de 5 ans il y a

A résolu


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

plus de 5 ans il y a

A résolu


Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

plus de 5 ans il y a

Charger plus