Community Profile

Contact

Top 1% contributor

It's not clear what you need *a* for. You can make *d* directly from *c* and *b* as follows: >> d=b(c) d = ...

1

Answered 1 day ago

Write a function a that takes a date vector as an input and returns the number of hours until the weekend begins. The beginning...

Solve this!

0

8 months ago

To restate what you posted, you have a set of data consisting of _(value, input_time)_ pairs. At some interval, you want to rep...

accepted

Answered 1 year ago

Well, I learned a new trick today. My method works on arrays without singleton dimensions and can be extended to 3-D or more, b...

1870 views

Responded 1 year ago

It looks like what you want to do is similar to the kron function that Matlab has for multiplication. Try using this code, whic...

If you want to keep your for loop, you can do it like this: d=[]; for k=1:length(b) end This appends the next set of numbers t...

1790 views

<http://en.wikipedia.org/wiki/Rumis Rumis> is a multiplayer 3D block board game where the goal is to have the most squares visib...

4 days ago

Check whether the input matrix is a normal magic square: <http://en.wikipedia.org/wiki/Magic_square> Output the logical va...

1 month ago

Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

Just like Matthew's problem <http://www.mathworks.com/matlabcentral/cody/problems/2793 2793> and Edward's problem <http://www.ma...

Given the vector a, find the longest run of consecutive numbers that can be evenly divided by the same number d where d > 1. ...

2 months ago

Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

MATLAB has a <http://www.mathworks.com/help/techdoc/ref/setfield.html setfield> and a <http://www.mathworks.com/help/techdoc/ref...

Load more