Gelöst


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

mehr als 3 Jahre vor

Gelöst


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] is s...

mehr als 3 Jahre vor

Gelöst


Moving average (variable kernel length)
Find the moving average in a vector. The kernel length is a variable. For example x = 1:10 kernel_length = 2 would r...

mehr als 3 Jahre vor

Gelöst


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

mehr als 3 Jahre vor

Gelöst


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

mehr als 3 Jahre vor

Gelöst


Powers Of
Fill the vector with powers of 2, so that vector(1) is 2^1, vector(2) is 2^2, etc. Stop with vector(10). Complete the function ...

mehr als 3 Jahre vor

Gelöst


Solving Quadratic Equations (Version 2)
Before attempting this problem, solve version 1: <https://www.mathworks.com/matlabcentral/cody/problems/2510-solving-quadratic-...

mehr als 3 Jahre vor

Gelöst


Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

mehr als 3 Jahre vor

Gelöst


Wind Chill Computation
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


Max of a Vector
Write a function to return the max of a vector

mehr als 3 Jahre vor

Gelöst


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

mehr als 3 Jahre vor

Gelöst


Angle difference between Hour Hand and Minute Hand of clock
*Calculate the difference of angles between Hour hand and Minute hand of clock* E.g. 1) At 12:00 Angle Difference = 0 deg...

mehr als 3 Jahre vor

Gelöst


Sort the vector with the given index
Given x = [1 2 4 8 17] and t = [1 3 2 5 4] then y = [1 4 2 17 8].

mehr als 3 Jahre vor

Gelöst


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

mehr als 3 Jahre vor

Gelöst


Repeat The Components of Matrix
Repeat The components of a matrix so that the size of the output matrix is double to input matrix and components are repeated ne...

mehr als 3 Jahre vor

Gelöst


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

mehr als 3 Jahre vor

Gelöst


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

mehr als 3 Jahre vor

Gelöst


Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

mehr als 3 Jahre vor

Gelöst


Replace 0 indices in array with 1's
Take a incoming vector, and replace 0's with ones

mehr als 3 Jahre vor

Gelöst


Matrix Generation from Vector Multiplication
Output the matrix generated from multiplying two vectors together

mehr als 3 Jahre vor

Gelöst


Check if inputted variable is a string or a number
Check if a inputted variable is a number or a string, given a string input (i.e. '1' is 1 and thus a number, 'a' is a string).

mehr als 3 Jahre vor

Gelöst


Find the sum of the largest two elements in a vector
With this one, you have to find the two largest elements in a vector and output the sum of those numbers.

mehr als 3 Jahre vor

Gelöst


Vector indexing: lower than mean
Find all values in a vector lower than the mean of the vector

mehr als 3 Jahre vor

Gelöst


Automatic String Editing
In this function, you will take an incoming string, and output the same string with each character one letter later in the alpha...

mehr als 3 Jahre vor

Gelöst


Find the mean of two vectors
Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)

mehr als 3 Jahre vor

Gelöst


String Delimination and Outputting
In this problem, take an incoming string and deliminate the string based on spaces. Output the first string in between the space...

mehr als 3 Jahre vor

Gelöst


Matrix element wise multiplication
Take two incoming vectors, and multiply them element wise

mehr als 3 Jahre vor

Gelöst


Matrix Ax=B problem
Take a incoming A and B vector, and solve for x

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Mehr laden