Solved


modulus of a number
find the modulus of a given number

4 years ago

Solved


Rotate matrix by -90 degrees
Rotate a Matrix by -90 degrees Example: X = 1 2 3 4 5 6 7 8 9 output = 7 4 ...

4 years ago

Solved


Resizing Matrices
Take an 4x3 matrix, and resize it to a 2x6 matrix

4 years ago

Solved


Return factorial of input n
example : input :n=4 output=24

4 years ago

Solved


Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

4 years ago

Solved


Negative matrix
Change the sign of all elements in given matrix.

4 years ago

Solved


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

4 years ago

Solved


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

4 years ago

Solved


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

4 years ago

Solved


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

4 years ago

Solved


Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

4 years ago

Solved


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

4 years ago

Solved


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

4 years ago

Solved


01 - Scalar variables
Create the following variables: <<http://samle.dk/STTBDP/Assignment1_1.png>>

4 years ago

Solved


Create cell array of strings
Convert the input to a cell array, but only if necessary. If the input is a string, return a 1-by-1 cell array containing the...

4 years ago

Solved


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

4 years ago

Solved


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

4 years ago

Solved


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

4 years ago

Solved


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

4 years ago

Solved


Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

4 years ago

Solved


Replace odd number in given matrix by zero
Replace the odd numbers in a given matrix with zero. Example A = [ 17 24 1 8 15 23 5 7 ...

4 years ago

Solved


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

4 years ago

Solved


Finding sum of even numbers in a vector.
Find the sum of all the even numbers present in the input vector x. Examples: Input x = [1 2 3 4] Output y is 6 Input...

4 years ago

Solved


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

4 years ago

Solved


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

4 years ago

Solved


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

4 years ago

Solved


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

4 years ago

Solved


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

4 years ago

Solved


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

4 years ago

Solved


Delete 2nd and 5th column of Given 6*6 matrix
Delete the 2nd and 5th columns of the given 6*6 matrix. Example Suppose A = magic(6) 35 1 6 26 19 ...

4 years ago

Load more