Community Profile

Contact

Top 1% contributor

To answer my own question: One can use the following code which uses only Matlab routines: dpi = get(0, 'ScreenPixelsPer...

accepted

0

Answered 2 years ago

I am having some troubling positioning a checkbox in a UI. I have (programmatically) added a number of rows of checkboxes to a f...

3 Answers

Asked 2 years ago

when the line |for i = 1:a:20| is executed it uses the value of a as it is then known, which is probably 1. You will need som...

Answered 4 years ago

I have the following code: data(ind) = data(ind) + shift; data(~ind) = data(~ind) - shift; The first line crashes wit...

2 Answers

Asked 10 days ago

I have a loop in which I read a lot of data and store it in a matrix, like this: l = numel(c_d); % c_d is data to be stored...

1 Answers

Asked 4 years ago

Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

Solve this!

1 year ago

Create a row array from 9 to 1, using the double colon operator.

Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

Given a vector x, the output y should equal the length of x.

2 years ago

If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

I am thinking of a number between 1 and 10000... can you guess what this number is? *Description* The test suite has rando...

3 years ago

Remove all characters that are below space in ASCII value.

Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

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

Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

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 number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

Load more