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

6 months 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]

6 months ago

Solved

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

6 months ago

Solved

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

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

6 months ago

Solved

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

6 months ago

Solved

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

6 months ago

Solved

modulus of a number
find the modulus of a given number

6 months ago

Solved

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

6 months ago

Solved

Take two incoming vectors and output the sum of the two vectors

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

6 months ago

Solved

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?

6 months 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 ]

6 months ago

Solved

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

6 months 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]

6 months 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]

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

6 months ago

Solved

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

6 months ago

Solved

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

6 months 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)-...

6 months 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];

6 months ago

Solved

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

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

6 months 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

6 months ago

Solved

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

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

6 months ago

Solved

Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

6 months ago

Solved

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

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

6 months ago