Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

circa 9 anni fa

Risolto


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.

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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.

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Carica altro