Solved


Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

mer än 5 år ago

Solved


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

mer än 5 år ago

Answered
Saving an array of images as an 'Image Stack'
According to the matlab documentation you can store multiple images to a single file as follows: imwrite(im1,'myMultipageFi...

mer än 7 år ago | 4

Solved


Pizza value using expression with parentheses
Pizza prices are typically listed by diameter, rather than the more relevant feature of area. Compute a pizza's value (cost per ...

mer än 7 år ago

Question


Why is there an out of memory error despite memory() stating there is enough?
I have the following code: data(ind) = data(ind) + shift; data(~ind) = data(~ind) - shift; The first line crashes wit...

mer än 8 år ago | 2 answers | 0

2

answers

Question


Why does adding a specific directory to Matlab path cause the save function to slowdown?
I'm having the following problem: in my application I'm storing a few hundred files. Lately, I notice that the save function has...

mer än 9 år ago | 1 answer | 1

1

answer

Answered
Help in Installing MATLAB2014(32 bit) in Ubuntu14.04(64bit)
There does not seem to be a 32-bit Linux release of that Matlab version (see <http://www.mathworks.com/support/sysreq/release201...

mer än 9 år ago | 0

Solved


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

ungefär 10 år ago

Solved


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

ungefär 10 år ago

Solved


Fahrenheit to Celsius using multiple statements
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...

ungefär 10 år ago

Solved


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

ungefär 10 år ago

Solved


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

ungefär 10 år ago

Solved


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

mer än 10 år ago

Solved


Sum of diagonal of a square matrix
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

mer än 10 år ago

Solved


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

mer än 10 år ago

Answered
How to determine size of checkbox
To answer my own question: One can use the following code which uses only Matlab routines: dpi = get(0, 'ScreenPixelsPer...

nästan 11 år ago | 0

| accepted

Question


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

nästan 11 år ago | 3 answers | 0

3

answers

Solved


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

nästan 12 år ago

Solved


Lose control
Remove all characters that are below space in ASCII value.

nästan 12 år ago

Solved


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

nästan 12 år ago

Solved


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

nästan 12 år ago

Solved


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

nästan 12 år ago

Solved


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

nästan 12 år ago

Solved


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

nästan 12 år ago

Solved


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

nästan 12 år ago

Solved


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

nästan 12 år ago

Solved


Project Euler: Problem 6, Natural numbers, squares and sums.
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 ...

nästan 12 år ago

Solved


Number of 1s in a binary string
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...

nästan 12 år ago

Solved


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

nästan 12 år ago

Solved


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

nästan 12 år ago

Load more