Gelöst


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

mehr als 8 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 ...

mehr als 8 Jahre vor

Gelöst


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

mehr als 8 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".

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

Gelöst


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

mehr als 8 Jahre vor

Gelöst


Max of a Vector
Write a function to return the max of a vector

mehr als 8 Jahre vor

Gelöst


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

mehr als 8 Jahre vor

Gelöst


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


sum of non-primes
The sum of the non-primes below 10 is 1+4+6+8+9+10=38 Find the sum of all the non-primes below the input, N.

mehr als 8 Jahre vor

Gelöst


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

mehr als 8 Jahre vor

Gelöst


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

mehr als 8 Jahre vor

Gelöst


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

mehr als 8 Jahre vor

Gelöst


02 - Vector Variables 4
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 1...

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

mehr als 8 Jahre vor

Gelöst


03 - Matrix Variables 5
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3e.png>>

mehr als 8 Jahre vor

Gelöst


03 - Matrix Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3b.png>> A 9x9 matrix of zeros, but with the following v...

mehr als 8 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.

mehr als 8 Jahre vor

Gelöst


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

mehr als 8 Jahre vor

Gelöst


02 - Vector Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of ...

mehr als 8 Jahre vor

Gelöst


Add two numbers
Add two numbers (For beginners)

mehr als 8 Jahre vor

Gelöst


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

mehr als 8 Jahre vor

Gelöst


02 - Vector Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2a.png>>

mehr als 8 Jahre vor

Gelöst


02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>

mehr als 8 Jahre vor

Gelöst


03 - Matrix Variables 4
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3d.png>> A 3x4 NaN (Not a Number) matrix (Hint: use ...

mehr als 8 Jahre vor

Gelöst


length of a vector
Find twice the length of a given vector.

mehr als 8 Jahre vor

Mehr laden