Gelöst


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

mehr als 2 Jahre vor

Gelöst


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

mehr als 2 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 is n=4 th...

mehr als 2 Jahre vor

Gelöst


Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

mehr als 2 Jahre vor

Gelöst


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

mehr als 2 Jahre vor

Gelöst


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

mehr als 2 Jahre vor

Gelöst


Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

mehr als 2 Jahre vor

Gelöst


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

mehr als 2 Jahre vor

Gelöst


Find parts of a circle.
Given radius (r) of a circle find the diameter (d), circumference (c), an area (a).

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

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

Gelöst


Summing Rows and Columns
Create a matrix y of size (n+1) whose last column's elements are the summation of the elements of all the other columns and last...

mehr als 2 Jahre vor

Gelöst


Find alternating sum
Given an array, find alternating sum i.e. – y = x (1) – x (2) + x (3) – x (4) + x (5) - …

mehr als 2 Jahre vor

Gelöst


Extract the prime numbers
Given a list of elements, extract the prime numbers from that array.

mehr als 2 Jahre vor

Gelöst


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

mehr als 2 Jahre vor

Gelöst


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x = 123045; x_vec = [1 2 3 0 4 5]; I happened upon a trick ...

mehr als 2 Jahre vor

Gelöst


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

mehr als 2 Jahre vor

Gelöst


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

mehr als 2 Jahre vor

Gelöst


Prime numbers between a , b.
Find all prime number between a & b (including a and b). example: a=100 b=120 y= [101 103 107 109 113]

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

Gelöst


Find all repeated numbers
For a given vector, find all numbers that repeated 2 times or more than 2 times. Example: A=[1 2 3 3 4 5 6 6 7] y=[3 ...

mehr als 2 Jahre vor

Gelöst


convert the number to binary format & count digits
Convert the given number to the corresponding binary format and count the number of digits in that binary number

mehr als 2 Jahre vor

Gelöst


Basics: counting digits of a number irrespective of the sign
publish the number of digits in any input integer example: -23---->2

mehr als 2 Jahre vor

Gelöst


Check if there are white spaces in the input string
If there are white spaces in the input string, output=1 else 0

mehr als 2 Jahre vor

Gelöst


Basic Quadratic Equation
Create the equation: y=(3x)^2+(5x)+35 and compute y for various values of x

mehr als 2 Jahre vor

Gelöst


find number of times of occurrence of the most frequent number in a row vector
In a given row vector, find the number of times a mode of a row vector has occurred example: in [2 5 5 5 5 3], output is 4 ...

mehr als 2 Jahre vor

Gelöst


Second Diagonal
Transpose the matrix from it's second diagonal.

mehr als 2 Jahre vor

Mehr laden