Solved


P(girl likes you | she smiled at you)
Compute the probability Given the input probabilities

4 months ago

Solved


Determine if LTI system with feedback control is stable
Linear timeiinvariant systems can be represented by the differential equation , where is an matrix, is an vector representing...

4 months ago

Solved


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

5 months ago

Solved


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

5 months ago

Solved


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

5 months ago

Solved


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

5 months ago

Solved


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

5 months ago

Solved


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

5 months ago

Solved


Getting the indices from a matrix
Inspired by Problem 645. Getting the indices from a matrix. Given a matrix A (or a vector), return the indices (always in row...

5 months ago

Solved


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

5 months ago

Solved


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

5 months ago

Solved


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

5 months ago

Solved


kmph to mps
convert kilometer per hour to meter per second

5 months ago

Solved


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

5 months ago

Solved


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

5 months ago

Solved


Count Vowels at Even Indices
Write a function `vowelEvenIndices` that counts the number of vowels (a, e, i, o, u) located at even indices (0-based) in a give...

5 months ago

Solved


Breaking up a chocolate bar
You've got a chocolate bar of size , and you want to break it up into bite-sized () pieces. How many steps are required to do th...

5 months ago

Solved


Extra colors
Context In the RGB color system used by Matlab, the color is a 1 x 3 / row vector [R G B] with each value/component R, G, B in ...

5 months ago

Solved


Estimating the Range of an Electric Vehicle (EV)
In Electric Vehicles (EVs), the driving range is the estimated distance a vehicle can travel on a fully charged battery. The ran...

5 months ago

Solved


Reverse a string
Return a string with the characters in reverse order from a given input string Ex: my_str = "Ciao" function should output "...

5 months ago

Solved


Convert RGB to Grayscale
Convert a 3 element RGB array to its correspoding grayscale pixel (a scalar) *Hint: a formula exists!

5 months ago

Solved


Area of a rectangle
FInd the area of a rectangle with a length L and width W. Round to the nearest integer.

5 months ago

Solved


Roll the Dice!
Description Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. Example [x1,x2] = rollDice(...

5 months ago

Solved


Diagonal Product of A Square Matrix
For a matrix A, calculate the product of its diagonal elements. * Assume all input matrices are square & corresponding element...

5 months ago

Solved


Sum All Positive Elements
Output a scalar that is equal to the sum of all positive elements in a given vector/matrix. For Example: The sum of all positi...

5 months ago

Solved


Remove the diagonal of a square matrix
Some Cody problems ask solvers to remove columns (e.g., CP 7), and others ask solvers to remove rows (e.g., CP 44033). Write a...

5 months ago

Solved


Sum of Positive Elements in a Matrix
Given a matrix A, write a function that returns the sum of all positive elements in A. Input: A = [-3, 4, -1; 6, -2, 8] ...

5 months ago

Solved


Remove Duplicate Words from a Sentence
Given a sentence as a string, remove all duplicate words while keeping their first occurrence and maintaining the original word ...

5 months ago

Solved


Remove Duplicate Words from a Sentence.
Given a sentence, remove any duplicate words, leaving only the first occurrence of each word. The output sentence should have wo...

5 months ago

Solved


Given length x find the area y of the square
Given length x find the area y of the square

5 months ago

Load more