Solved


Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

ongeveer 3 jaar ago

Solved


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

ongeveer 3 jaar ago

Solved


Determine the length of a string of characters
Determine the length of a string of characters

ongeveer 3 jaar ago

Solved


first element of matrix
find the first elements of a column matrix

ongeveer 3 jaar ago

Solved


Odd times 3
Given a input matrix x, multiply all odd values by 3. Even values remain the same. example: x = [1 2 3 4 5;... 6 7...

ongeveer 3 jaar ago

Solved


multiply an array by its position number
You have given an array. Multiply an array by its position number

ongeveer 3 jaar ago

Solved


find the mean of all elements in a matrix
given a matrix, just find the mean of all elements in the matrix

ongeveer 3 jaar ago

Solved


modulus of a number
find the modulus of a given number

ongeveer 3 jaar ago

Solved


find a specific element from an matrix
Find the element from matrix which is in 2nd row and 3rd column.

ongeveer 3 jaar ago

Solved


Simple Vector Addition
Take two incoming vectors and output the sum of the two vectors

ongeveer 3 jaar ago

Solved


Simple String Concatenation
This is a simple problem involving taking two incoming strings, and outputting the concatenated string with a space separating t...

ongeveer 3 jaar ago

Solved


Counting votes
x is a vector of votes, e.g. x=[1 2 3 2 2 1 3 2 1 2 2 2 2], who is the winner? 1,2,3?

ongeveer 3 jaar ago

Solved


Rotate array 90 degrees
Rotate the given matrix by 90 degrees. Example, A = [1 2 3 ; 4 5 6 ] B = rotated(A) = [ 3 6; 2 5; 1 4 ]

ongeveer 3 jaar ago

Solved


find whether it is prime or not
For a given number find if its prime

ongeveer 3 jaar ago

Solved


Rotate a matrix for 180 degree
Rotate a matrix for 180 degree for eg: x=[1 2 3 4] y=[4 3 2 1]

ongeveer 3 jaar ago

Solved


Rotate a matrix for 180 degree
Rotate a matrix for 180 degree for eg: x=[1 2 3 4] y=[4 3 2 1]

ongeveer 3 jaar ago

Solved


Count the numbers
In a array x, count the number of times the number n appears in x. for example: x = [1 2 3 4 3 2 1 2] and n = 2 the answer sh...

ongeveer 3 jaar ago

Solved


Add the even numbers
Add only the even numbers of x example: x = [1 2 3 4 5] the positive numbers are: 2 4, so their sum is 6

ongeveer 3 jaar ago

Solved


Add the positive numbers
Add only the positive numbers of x example: x = [-2 -1 0 1 2 3] the positive numbers are: 1 2 3, so their sum is 6

ongeveer 3 jaar ago

Solved


All odd - all even
All odd numbers in x are added, while all even numers are subtracted from this. example: x = [1 2 3 4 5]; y = +(1+3+5)-...

ongeveer 3 jaar ago

Solved


Remove multiples of N
in the vector x remove all multiples of N. x = [1 2 3 4 5 6]; N = 2; Then y = [1 3 5];

ongeveer 3 jaar ago

Solved


Magnitude of a vector
Given a vector x, what is its magnitude?

ongeveer 3 jaar ago

Solved


Chicken Race
2 chickens, Pete and Fred, compete in a 100 meter race. Pete runs at a velocity of vp meter/second and Fred is slower, running ...

ongeveer 3 jaar ago

Solved


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

ongeveer 3 jaar ago

Solved


Add the odd numbers
Add only the odd numbers of x example: x = [1 2 3 4 5] the positive numbers are: 1 3 5, so their sum is 9

ongeveer 3 jaar ago

Solved


time difference
The arrays x and y contain time values in the form of: x = [hours minutes seconds] Create the output z which contains the...

ongeveer 3 jaar ago

Solved


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

ongeveer 3 jaar ago

Solved


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

ongeveer 3 jaar ago

Solved


Vector with a repeated entry
Create a row vector of length n, filled with 4's. For example, if n = 3, output = [4 4 4] Hint: Search for the function...

ongeveer 3 jaar ago

Load more