A résolu


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

plus de 10 ans il y a

A résolu


radius of a spherical planet
you just measured its surface area, that is the input.

plus de 10 ans il y a

A résolu


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

plus de 10 ans il y a

A résolu


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

plus de 10 ans il y a

A résolu


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

plus de 10 ans il y a

A résolu


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

plus de 10 ans il y a

A résolu


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

plus de 10 ans il y a

A résolu


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

plus de 10 ans il y a

Question


uitable row name width - why is this SOO wide?!
I was just wondering if anybody could tell me why the row name width of a uitable is so obnoxiously wide? It appears to literall...

presque 11 ans il y a | 1 réponse | 1

1

réponse

A répondu
Clickable transparent lines are impossible?
Thanks Jan for the answer! I actually got it right before you posted your idea, for me, I knew the plot lines would never inters...

presque 11 ans il y a | 0

Question


Clickable transparent lines are impossible?
So I have 3 lines (technically patches) that have some transparency enabled. These lines were generated by the patchline FEX sub...

presque 11 ans il y a | 2 réponses | 0

2

réponses

A résolu


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

presque 11 ans il y a

A résolu


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

presque 11 ans il y a

A résolu


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

presque 11 ans il y a

A répondu
How to pad ones at end of the image?
There is literally a function called padarray.. It does a pretty nice job. http://www.mathworks.com/help/images/ref/padarray.h...

presque 11 ans il y a | 1

| A accepté

A répondu
Why can't MATLAB resize an image nicely?
A robust way I figured out how to do it was resize the image to 10x (or whatever you want, benefits seem to cut off at 8-10 time...

presque 11 ans il y a | 0

Question


Why can't MATLAB resize an image nicely?
So I have an image with some text on it that I want to display in MATLAB for whatever reason, sounds easy enough, but it turns o...

presque 11 ans il y a | 4 réponses | 0

4

réponses

A résolu


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

presque 11 ans il y a

A résolu


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

presque 11 ans il y a

A résolu


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

presque 11 ans il y a

A résolu


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

presque 11 ans il y a

A résolu


Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...

presque 11 ans il y a

A résolu


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

presque 11 ans il y a

A résolu


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

presque 11 ans il y a

A résolu


Increment a number, given its digits
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...

presque 11 ans il y a

A résolu


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

presque 11 ans il y a

A résolu


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

presque 11 ans il y a

A résolu


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

presque 11 ans il y a

Question


What's the Default Light from Figure Toolbar > Insert Light
When I plot something and create a surface object, and then I go to figure > Insert > Light, it adds like the best lighting ever...

environ 11 ans il y a | 1 réponse | 0

1

réponse

A répondu
how do I declare a variable matrix of any size?
If you could give us your exact code you are trying now, that would be really helpful. zeros(your matrix size) should work fine ...

environ 11 ans il y a | 0

Charger plus