Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

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

7 years ago

Solved


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

7 years ago

Solved


Compute total cost
A soda costs 2 dollars. A taco costs 3 dollars. Write a statement that assigns totalCost with the total meal cost given the numb...

7 years ago

Solved


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

7 years ago

Solved


Tree Height
Assign treeHeight with the tree height given the shadow length and angle of elevation. Simple geometry can compute the heigh...

7 years ago

Solved


Multi-line comments
* Fix the syntax errors.

7 years ago

Solved


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

7 years ago

Solved


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the hourly wage times 40 and times 50, because annualSalary = hour...

7 years ago

Solved


Declaring a character
* Assign middleInitial with the character T.

7 years ago

Solved


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

7 years ago

Solved


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

7 years ago

Solved


Arithmetic array operations
* Add x to each element of array temperatureReadings.

7 years ago

Solved


Construct an array
* Construct an row array named observedValues with elements sensorReading1, sensorReading2, and sensorReading3.

7 years ago

Solved


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

7 years ago

Solved


Logic variables
* Assign isAvailable with true.

7 years ago

Solved


Array resizing: Removing elements
* Remove elements 2, 4, and 6 from row array pendingTasks

7 years ago

Solved


pressure to dB?
given x ratio of pressure, find corresponding y dB

7 years ago

Solved


Find max
Find the maximum value of a given vector or matrix.

7 years ago

Solved


Indexing an array element
* Assign currentStudent with the second element of array testScores. _Reminder: Array indexing starts with 1._

7 years ago

Solved


Comments
* Fix the syntax errors.

7 years ago

Solved


Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

7 years ago

Solved


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

7 years ago

Solved


Linear system of equations
Solve the system of equations in three variables.

7 years ago

Solved


Circle area using pi
Write a statement that assigns circleArea with the circle's area given circleRadius. Use the built-in mathematical constant pi. ...

7 years ago

Solved


Plus x: A first program
_Solve this problem in Mathwork's online Cody system._ Write a statement that assigns y with 5 plus x. Ex: If input x = 2,...

7 years ago

Solved


Free passes for everyone!
THIS PROBLEM IS TEMPORALLY DECOMMISSIONED WHILE IT IS UPDATED. PLEASE WAIT _Simply return the name of the coolest numerical c...

7 years ago

Solved


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

7 years ago

Solved


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

7 years ago

Solved


Assigning a sum
* Write a statement that assigns numCoins with numNickels + numDimes.

7 years ago

Load more