Resuelto


Replace all odd numbers with NaN
Replace all odd numbers in the vector or matrix with NaN. For example, if x = [1 3 4 5 8 11]; then return y = [NaN Na...

alrededor de 4 años hace

Resuelto


find the 'M'
for an input x, return 1 at the location of the letter 'M'

alrededor de 4 años hace

Resuelto


Sum the rows
Sum the rows of the given matrix. Example x = [ 1 2 3 4 ] y = [ 3 7 ]

alrededor de 4 años hace

Resuelto


Where is the number that you want to find?
For a given matrix A, find where the input number x appears. Do this task by returning the vector which contains the row and th...

alrededor de 4 años hace

Resuelto


Draw 'W'
For any given n, return a matrix of height n and width 4n-3 containing a W of ones. Example: n=2 ans= [1 0 1 0 1 0 1 0 1 0...

alrededor de 4 años hace

Resuelto


Perimeter of a quadrilateral
There are four cars starting at a point. The first car points north, the second one points east, the third one points south, an...

más de 4 años hace

Resuelto


Volume of Spherical Shell
In three-dimensional space, a spherical shell can be constructed from two concentric spheres. Determine the volume of a spheric...

más de 4 años hace

Resuelto


Raise a polynomial to a power
In Matlab, polynomials are represented by a vector of coefficients. For example, the polynomial p=a*x^2 + b*x + c is represente...

más de 4 años hace

Resuelto


Compute the perimeter of an ellipse
While the area of an ellipse is straightforward to compute, the perimeter (or circumference) is more complicated. The perimeter ...

más de 4 años hace

Resuelto


Count estrangements
Recently I made a puzzle for my wife that included a cryptogram, which involves an arrangement of the letters A through Z. I use...

más de 4 años hace

Resuelto


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

más de 4 años hace

Resuelto


Conversion from hours to mili sec
Convert given input in hours to mili seconds

más de 4 años hace

Resuelto


Create a constant offset.
Add a constant offset to an array. Example a = [1 3 5 9] offset = 2 y = [3 5 7 11]

más de 4 años hace

Resuelto


Sum of cubes
Write a program to determine sum of cubes of first n odd numbers.

más de 4 años hace

Resuelto


Display negative numbers
Given array,x, display all the negative numbers and display output as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

más de 4 años hace

Resuelto


Alternate elements!
Write a function that combines two lists by alternating the elements, e.g. ['a','b','c'], ['1','2','3'] → 'a1b2c3'.

más de 4 años hace

Resuelto


Double the next!
Given two numbers, m and n, find a matrix m x n where each element value is twice the value of the previous element. Starting fr...

más de 4 años hace

Resuelto


Function composition - harder
Write a function that accepts an arbitrary number of function handles f_1, f_2, ..., f_n and returns the composition h. That is,...

más de 4 años hace

Resuelto


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

más de 4 años hace

Resuelto


Rank of magic square (for beginners)
Compute the rank r of a magic square of order n WITHOUT rank and magic functions.

más de 4 años hace

Resuelto


Divisors for big integer
Inspired by Problem 1025 and Project Euler 12. Given n, return the number y of integers that divide N. For example, with ...

más de 4 años hace

Resuelto


Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

más de 4 años hace

Resuelto


02 - Vector Variables 4
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 1...

más de 4 años hace

Resuelto


Do Fast Fourier Transformation
Example Fast Fourier Transformation from vector [2,1]) ans = 3 1

más de 4 años hace

Resuelto


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

más de 4 años hace

Resuelto


Convert binary numbers to hexadecimal numbers
Function must convert the input vector x composed of 0 and 1 (length is a multiple of 8) in hexadecimal. Most significant bit is...

más de 4 años hace

Resuelto


Calculate FFT
Calculate the fft manually, without using matlab's builtin function. No cheating allowed.

más de 4 años hace

Resuelto


07 - Common functions and indexing 3
Define _eMat_: <<http://samle.dk/STTBDP/Assignment1_3e.png>> Create the variable _eMat2_, which is equal to _eMat_ with th...

más de 4 años hace

Resuelto


Throw common elements of two vector arrays in sorted manner
Throw common elements as output in sorted manner (acending order) of two given input vector arrays

más de 4 años hace

Cargar más