A résolu


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

environ 9 ans il y a

A résolu


count to vector
Return a matrix of numbers of dimension K by N, where K = prod(v), and N=length(v). The rows count from a vector of ones up to v...

environ 9 ans il y a

A résolu


index of n in magic(n)
let input=5; magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 ...

environ 9 ans il y a

A résolu


index of n^2 in magic(n)
input=5 magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 ...

environ 9 ans il y a

A résolu


Matrix rotation as per given angle
Given a user defined matrix and angle of rotation, rotate the elements of output matrix as clockwise or anti-clockwise. Angle wi...

environ 9 ans il y a

A résolu


Logic variables
* Assign isAvailable with true.

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


Factorial !
Calculate the factorial of a non-negative integer without using the built in function *factorial*

environ 9 ans il y a

A résolu


Put Two 1D matrices into one 1D matrix
Example: If input a = [1 2 3 4 5]; input b = [10 9 8 7 6]; then output will be, y_correct = [1 10 2 9 3 8 4 7 5...

environ 9 ans il y a

A résolu


Determine if input is a Narcissistic number
<http://en.wikipedia.org/wiki/Narcissistic_number Narcissistic number> is a number that is the sum of its own digits each raised...

environ 9 ans il y a

A résolu


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

environ 9 ans il y a

A résolu


Saving MATLAB session to a file
How to save MATLAB session to a file?

environ 9 ans il y a

A résolu


Palindrome Check
Check whether the entire matrix is palindrome or not. Example matrix = [7 8 7] matrix_reverse = [7 8 7] So the mat...

environ 9 ans il y a

A résolu


Find the position of first minimum value in an integer array with numbers
If x = [2 6 4 9 10 3 1 5 1] the the output should be 7, because the first minimum value (1) lies at the 7th position.

environ 9 ans il y a

A résolu


calculate RMS voltage
given peak to peak voltage, calculate rms voltage

environ 9 ans il y a

A résolu


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

environ 9 ans il y a

A résolu


Phonebook-like problem
strcmpi('Yes', 'No')

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

environ 9 ans il y a

A résolu


Tiling a matrix
Given a matrix and a number of columns, replicate matrix in a single row

environ 9 ans il y a

A résolu


How long do each of the stages of the rocket take to burn?
A space rocket has 3 stages: - stage 1, s1; - stage 2, s2; - stage 3, s3. If s1 burns 3 x as long as s2 which burns ...

environ 9 ans il y a

A résolu


Matlab Basics - y as a function of x
write a script to calculate y as a function of x, such that y = 6x^2 + 5x - 2

environ 9 ans il y a

A résolu


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

environ 9 ans il y a

A résolu


find the roots of a quadratic equation
for e.g x = [ 2 -1 -3] y = [1.5 -1]

environ 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

plus de 9 ans il y a

A résolu


Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

Charger plus