Risolto


Area of a circle
Find the value for area of the circle if diameter is given

quasi 6 anni fa

Risolto


The answer to life the universe and everything
Write a function that gives the answer to life the universe and everything to every input except the input is 42. In this case t...

quasi 6 anni fa

Risolto


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

quasi 6 anni fa

Risolto


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

quasi 6 anni fa

Risolto


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

quasi 6 anni fa

Risolto


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

quasi 6 anni fa

Risolto


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]

quasi 6 anni fa

Risolto


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

quasi 6 anni fa

Risolto


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

quasi 6 anni fa

Risolto


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

quasi 6 anni fa

Problema


The answer to life the universe and everything
Write a function that gives the answer to life the universe and everything to every input except the input is 42. In this case t...

quasi 6 anni fa | 1 | 66 risolutori

Risolto


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

quasi 6 anni fa

Risolto


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

quasi 6 anni fa

Risolto


Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

quasi 6 anni fa

Risolto


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

quasi 6 anni fa

Risolto


Is my wife right?
Regardless of input, output the string 'yes'.

quasi 6 anni fa

Risolto


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

quasi 6 anni fa

Risolto


How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

quasi 6 anni fa

Risolto


Times 3 problem
When you enter the number, it should return the number multiplied by 3

quasi 7 anni fa

Risolto


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

quasi 7 anni fa

Risolto


Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

quasi 7 anni fa

Risolto


Integer sequence - 2 : Kolakoski sequence
Get the n-th term of <https://oeis.org/A000002 Kolakoski Sequence>.

quasi 7 anni fa

Risolto


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

quasi 7 anni fa

Risolto


Array of Ones
Create a 100 X 100 array of ones.

quasi 7 anni fa

Risolto


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

quasi 7 anni fa

Risolto


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

quasi 7 anni fa

Risolto


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

quasi 7 anni fa

Risolto


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

quasi 7 anni fa

Risolto


Produce a cosine wave
Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/cosine-eqn.png>>

quasi 7 anni fa

Risolto


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

quasi 7 anni fa

Carica altro