A résolu


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

environ 9 ans il y a

A résolu


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

environ 9 ans il y a

A résolu


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

environ 9 ans il y a

A résolu


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

environ 9 ans il y a

A résolu


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

environ 9 ans il y a

A résolu


Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

environ 9 ans il y a

A résolu


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

environ 9 ans il y a

A résolu


Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

environ 9 ans il y a

A résolu


Comparing floating point values
* Assign matchFound with true if firstSample and secondSample are less than thresholdValue.

environ 9 ans il y a

A résolu


Least common multiple of many numbers
1:6 -> 60

environ 9 ans il y a

A résolu


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

environ 9 ans il y a

A résolu


Concatenating strings
* Write a statement that assigns fullName with firstName, a space, then lastName. Ex: If firstName is Alan and lastName is Tu...

environ 9 ans il y a

A résolu


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

environ 9 ans il y a

A résolu


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

environ 9 ans il y a

A résolu


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

environ 9 ans il y a

A résolu


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

environ 9 ans il y a

A résolu


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.

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


Complex number
For complex number c=a+bi, write code that will add a and b together.

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

environ 9 ans il y a

A résolu


Count from 0 to N^M in base N.
Return an array of numbers which (effectively) count from 0 to N^M-1 in base N. The result should be returned in a matrix, with ...

environ 9 ans il y a

A résolu


Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

environ 9 ans il y a

A résolu


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

environ 9 ans il y a

A résolu


Matrix which contains the values of an other matrix A at the given locations.
If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1]; ...

environ 9 ans il y a

A résolu


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

environ 9 ans il y a

A résolu


05 - Vector Equations 2
Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

environ 9 ans il y a

A résolu


"mirror" matrix
Create n x 2n "mirror" matrix of this type: e.g. for n = 2 m = [1 2 2 1;1 2 2 1] e.g. for n = 3 m = [1 2 3 3 2 1...

environ 9 ans il y a

Charger plus