Solved

Binary

Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

5 månader ago

Solved

Sum the real and imaginary parts of a complex number

Sum the real and imaginary parts of a complex number. Example c = 1+2i has the solution 1 + 2 = 3

5 månader ago

Solved

Distance walked 2D

Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

5 månader ago

Solved

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

5 månader ago

Solved

Find the square of the sum of the digits of a number

If a number (n) is provided as an input, find the square of the sum of the digits of the number. Example If n = 21, the an...

5 månader ago

Solved

Matlab Basics II - Determine if an array has a 3rd dimension

For an array A, determine whether it has 3 dimensions, return 0 if x is only 2D, and 1 if x is 3D

5 månader ago

Solved

Matlab Basics II - Velocity of a particle

A particle is moving in space, such that it's velocity is given by: <<http://s30.postimg.org/5rf1xtvj5/cody1.png>> write a...

5 månader ago

Solved

Matlab Basics II - Unit Conversion

Write a function that converts Kg to lbs, returns the answer to the nearest 1/100th of a pound

5 månader ago

Solved

Matlab Basics - Assigning Variables

Assign different types of data to variables: integer, double, and strings Example: A is a double, for example 2.34 B is a...

5 månader ago

Solved

Sum of series VII

What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

5 månader ago

Solved

Sum of series VI

What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

5 månader ago

Solved

Sum of series II

What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

5 månader ago

Solved

Sum of series III

What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

5 månader ago

Solved

Find the index of n in magic(n)

If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

5 månader ago

Solved

Count consecutive 0's in between values of 1

So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

5 månader ago

Solved

Find last zero for each column

Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...

5 månader ago

Solved

Convert a Cell Array into an Array

Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

5 månader ago

Solved

How many monitors are connected ?

How to obtain the numbers of monitors connected to your computer ?

5 månader ago

Solved

Finding peaks

Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...

5 månader ago

Solved

Basics: Divide integers to get integer outputs in all cases

Divide integers a and b in such a way that output y is always an integer (in ceil manner)

5 månader ago

Solved

Vector of numbers divisible by 3

* Input(n) - any integer * Output(v) - vector with numbers divisible by 3(exept 0) starting from n to 0 Examples: * n=6...

5 månader ago

Solved

Volume of a sphere given its surface area

You just measured its surface area, that is the input.

5 månader ago

Solved

Create a matrix from a cell

In this problem , you must convert a cell into a matrix and pad each cell with NaN. *Example 1:* If you have the input...

5 månader 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...

5 månader ago

Solved

Vectorizing, too easy or too hard?

Please insert a . before any ^, * or / in the string. That's it!!

5 månader ago

Solved

Better bullseye matrix

<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

5 månader ago

Solved

Back to basics 16 - byte order

Covering some basic topics I haven't seen elsewhere on Cody. Switch the byte order of the input (i.e. if little-endian -> big...

5 månader ago

Solved

Back to basics 3 - Temp Directory

Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the path to the system's current temp di...

5 månader ago