Solved


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

mer än 4 år ago

Solved


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

mer än 4 år ago

Solved


What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section. <http://www.mathworks.de/matlab...

mer än 4 år ago

Solved


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

mer än 4 år ago

Solved


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

mer än 4 år ago

Solved


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

mer än 4 år ago

Solved


Min of a Matrix
Return the minimum value in the given matrix.

mer än 4 år ago

Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

mer än 4 år ago

Solved


Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

mer än 4 år ago

Solved


Area of a circle
Find the value for area of the circle if diameter is given

mer än 4 år ago

Solved


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

mer än 4 år ago

Solved


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


wythoff sequence
find the lower wythoff sequence upto n; https://oeis.org/A000201

mer än 4 år ago

Solved


Quadratic equation
given three inputs (a, b, c) for the equation a*x^2+b*x+c=0; return 1 if the roots are complex (non zero imaginary), and 0 if th...

mer än 4 år ago

Answered
Listing elements from one matrix to another
The formatting in the example you gave us did not translate well; however, the best way to do this can avoid for loops entirely....

mer än 4 år ago | 0

| accepted

Solved


Orientation of a 3D coordinate frame
The orientation of a body-fixed frame {B} with respect to the world frame {W} is described by an SO(3) rotation matrix. Compute...

mer än 4 år ago

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

mer än 4 år ago

Solved


Guess the number I'm thinking of
In this game you are competing against two other people to guess the number that I'm thinking of. # I randomly choose an *i...

mer än 4 år ago

Solved


Return fibonacci sequence do not use loop and condition
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

mer än 4 år ago

Solved


Integer Sequence - II : New Fibonacci
Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...

mer än 4 år ago

Solved


Find the next Fibonacci number
In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...

mer än 4 år ago

Solved


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

mer än 4 år ago

Load more