Solved

Maximum value in a matrix

Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

oltre 2 anni ago

Solved

Right and wrong

Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

oltre 2 anni ago

Solved

Bottles of beer

Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

oltre 2 anni ago

Solved

Roll the Dice!

*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

oltre 2 anni ago

Solved

Combined Ages 1 - Symmetric, n = 3

You have probably seen the common riddle wherein combined ages are provided and you must determine the individual ages. For exam...

oltre 2 anni ago

Solved

Solve the set of simultaneous linear equations

Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

oltre 2 anni ago

Solved

Linear system of equations

Solve the system of equations in three variables.

oltre 2 anni ago

Solved

System of equations

Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

oltre 2 anni ago

Solved

Column norms of a matrix

Given a matrix M, return a vector y such that for each k y(k)=norm(M(:,k)) (y(k) is the Euclidean norm of the k-th col...

oltre 2 anni ago

Solved

Find the Oldest Person in a Room

Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

oltre 2 anni ago

Solved

Convert from Fahrenheit to Celsius

Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

oltre 2 anni ago

Solved

Calculate Amount of Cake Frosting

Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

oltre 2 anni ago

Solved

Convert a numerical matrix into a cell array of strings

Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

circa 3 anni ago

Solved

Create a cell array out of a struct

Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

circa 3 anni ago

Solved

Cell joiner

You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

circa 3 anni ago

Solved

Extra safe primes

Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

circa 4 anni ago

Solved

Compute the step response of a DC motor

Compute the step response of a DC motor shown below <<http://blogs.mathworks.com/images/seth/cody/dc-motor.png>> The param...

circa 4 anni ago

Solved

Basic electricity in a dry situation

⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ &#...

circa 4 anni ago

Solved

Bullseye Matrix

Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

oltre 4 anni ago

Solved

Model a simple pendulum

Model a simple pendulum of length 200cm with bob of mass 100g and plot the position in degrees. The pendulum starts at 30 degree...

oltre 4 anni ago

Solved

Square a Number

Given an input x, return y, which is equal to the square of x.

oltre 4 anni ago

Solved

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

oltre 4 anni ago

Solved

Counting pulses in a signal

Count the number of pulses that are the result of summing each pulse generator block. Pulse Generator blocks produce a recurr...

oltre 4 anni ago

Solved

Make a full wave rectifier

Produce a full wave rectifier waveform for the given sine wave source. For a sine wave input, the output of the full wave rec...

oltre 4 anni ago

Solved

Model a mass spring system

Model an ideal mass-spring system shown below where the spring is initially stretched. <<http://blogs.mathworks.com/images/se...

oltre 4 anni ago

Solved

Add offset to a signal

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-offset-eqn.png>> You should see a downward...

oltre 4 anni ago

Solved

Produce a sine wave

Produce a sine wave with amplitude 3: <<http://blogs.mathworks.com/images/seth/cody/sine-eqn.png>>

oltre 4 anni ago

Solved

Pentagonal Numbers

Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

oltre 4 anni ago

Solved

Pernicious Anniversary Problem

Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...

oltre 4 anni ago