Risolto


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

quasi 7 anni fa

Risolto


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

quasi 7 anni fa

Risolto


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

quasi 7 anni fa

Risolto


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

quasi 7 anni fa

Risolto


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

quasi 7 anni fa

Risolto


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

circa 7 anni fa

Risolto


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

circa 7 anni fa

Risolto


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

circa 7 anni fa

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 7 anni fa

Risolto


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

circa 7 anni fa

Risolto


04 - Scalar Equations 1
Define the variable a: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> Use this to calculate x: <<http://samle.dk/STTBD...

circa 7 anni fa

Risolto


Filter AC, pass DC
Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...

circa 7 anni fa

Risolto


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

circa 7 anni fa

Risolto


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

circa 7 anni fa

Risolto


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

circa 7 anni fa

Risolto


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

circa 7 anni fa

Risolto


only input
Return the output without writing any code into the function.

circa 7 anni fa

Risolto


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

circa 7 anni fa

Risolto


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

circa 7 anni fa

Risolto


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

circa 7 anni fa

Risolto


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

circa 7 anni fa

Risolto


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

circa 7 anni fa

Risolto


length of a vector
Find twice the length of a given vector.

circa 7 anni fa

Risolto


inner product of two vectors
inner product of two vectors

circa 7 anni fa

Risolto


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

circa 7 anni fa

Risolto


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

circa 7 anni fa

Risolto


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

circa 7 anni fa

Risolto


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

circa 7 anni fa

Risolto


Is my wife right?
Regardless of input, output the string 'yes'.

circa 7 anni fa

Risolto


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

circa 7 anni fa

Carica altro