Gelöst


Sum of Two Numbers
Given two integer numbers x and y, calculate their sum and put it in z. Examples: Inputs x = 2, y = 4 Output z is 6 ...

etwa 7 Jahre vor

Gelöst


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

etwa 7 Jahre vor

Gelöst


Determine the square root
Determine the square root of the value the user has entered, n.

etwa 7 Jahre vor

Gelöst


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

etwa 7 Jahre vor

Gelöst


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

etwa 7 Jahre vor

Gelöst


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

etwa 7 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 7 Jahre vor

Gelöst


Save variables
a=[1] Save variable a that is located in workspace into current folder. File name should be 'a.mat'

etwa 7 Jahre vor

Gelöst


Print true if
all elements are larger than 5 a=[1 3 5 8 6]; b=[6 6 6 6 6]; function(a) should be false, and function(b) will be tru...

etwa 7 Jahre vor

Gelöst


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

etwa 7 Jahre vor

Gelöst


Calculate some equation
Using given inputs x and z, make two outputs that are y1 = (xz)/(x/z)^2 + 14x^2 - 0.8z^2 y2 = x^z - z^x + (x/z)^2 - (z/x...

etwa 7 Jahre vor

Gelöst


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

etwa 7 Jahre vor

Gelöst


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

etwa 7 Jahre vor

Gelöst


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

etwa 7 Jahre vor

Gelöst


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

etwa 7 Jahre vor

Gelöst


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

etwa 7 Jahre vor

Gelöst


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

etwa 7 Jahre vor

Gelöst


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

mehr als 7 Jahre vor

Gelöst


Will there be a new leader?
Simply answer the title.

mehr als 7 Jahre vor

Gelöst


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

mehr als 7 Jahre vor

Gelöst


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.

mehr als 7 Jahre vor

Gelöst


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

mehr als 7 Jahre vor

Gelöst


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


0<=x<=pi?
Check whether the given angle is between zero and pi. Return logical true or false.

mehr als 7 Jahre 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 7 Jahre vor

Gelöst


Rounding
Round 10.67 and make 'y' equal to that number.

mehr als 7 Jahre vor

Gelöst


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

mehr als 7 Jahre vor

Gelöst


Guess
A random number between 1 and 10 is created for the variable y. Guess what its value is.

mehr als 7 Jahre vor

Gelöst


Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.

mehr als 7 Jahre vor

Mehr laden