Resuelto


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

alrededor de 5 años hace

Resuelto


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


07 - Common functions and indexing 4
Define the matrix _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 t...

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


factorial of a number x
Factorial of a number x

alrededor de 5 años hace

Resuelto


04 - Scalar Equations 2
Define the variables a and b: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b.png>...

alrededor de 5 años hace

Resuelto


Your favourite city!
Type your favourite city.

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

alrededor de 5 años hace

Resuelto


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

alrededor de 5 años hace

Resuelto


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

alrededor de 5 años hace

Resuelto


Find Out sum of principal diagonal element of given matrix
Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

alrededor de 5 años hace

Resuelto


Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vert...

alrededor de 5 años hace

Resuelto


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

alrededor de 5 años hace

Resuelto


Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

alrededor de 5 años hace

Resuelto


Matlab Basics - Assigning Variables
Assign different types of data to variables: integer, double, and strings Example: A is a double, for example 2.34 B is a...

alrededor de 5 años hace

Resuelto


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

alrededor de 5 años hace

Resuelto


Array of Ones
Create a 100 X 100 array of ones.

alrededor de 5 años hace

Resuelto


Positive Infinity
Round the array a towards positive infinity

alrededor de 5 años hace

Resuelto


y equals x divided by 2
function y = x/2

alrededor de 5 años hace

Resuelto


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

alrededor de 5 años hace

Resuelto


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

alrededor de 5 años hace

Cargar más