Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Mehr laden