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.

más de 3 años 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];

más de 3 años 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...

más de 3 años 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...

más de 3 años 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 =...

más de 3 años ago

Solved

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

más de 3 años ago

Solved

* Fix the syntax errors.

más de 3 años 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...

más de 3 años 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...

más de 3 años ago

Solved

Declaring a character
* Assign middleInitial with the character T.

más de 3 años ago

Solved

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

más de 3 años 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.

más de 3 años ago

Solved

Arithmetic array operations

más de 3 años ago

Solved

Construct an array

más de 3 años ago

Solved

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

más de 3 años ago

Solved

Logic variables
* Assign isAvailable with true.

más de 3 años ago

Solved

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

más de 3 años ago

Solved

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

más de 3 años ago

Solved

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

más de 3 años ago

Solved

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

más de 3 años ago

Solved

* Fix the syntax errors.

más de 3 años 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 ...

más de 3 años 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...

más de 3 años ago

Solved

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

más de 3 años 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. ...

más de 3 años 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,...

más de 3 años 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...

más de 3 años ago

Solved

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

más de 3 años 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. ...

más de 3 años ago

Solved

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

más de 3 años ago