A résolu


Steal, Share, or Catch
You, I, and a few other characters are going to play a game of *Steal, Share or Catch*. We are going to play it 10,000 times vs...

presque 13 ans il y a

Réponse apportée
Is there a function or method that rounds a value towards a entries of a vector?
v = 1.25:10.25; x = 5.5; v(find(x-v>0,1,'last')); %round to nearest lower v(find(x-v<0,1,'first')); %round to nearest...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Help with 3D plot and meshgrid
You could use the *reshape* command to turn your matrix v into one with the same size as your mesh, then plot using a command li...

presque 13 ans il y a | 0

Réponse apportée
If I am given a image of black circle with white background, how can I find the exact center of that circle?
Is this a binary image? If not, you'll need to do some thresholding. Once you do that, you can use *regionprops* (if you have th...

presque 13 ans il y a | 2

A résolu


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should b...

presque 13 ans il y a

Réponse apportée
Set GUI sliders to parameters?
In the callback for whatever GUI control is activated to perform your calculations, add in code that looks something like this: ...

presque 13 ans il y a | 0

A résolu


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifmq zpv...

presque 13 ans il y a

A résolu


Change a specific color in an image
The ability to change colors can be a useful tool in image processing. Given an m x n x 3 array (much like CData in images), fin...

presque 13 ans il y a

Réponse apportée
how to find out number of rows in particular matrix of the cell?
>> a = {[1 2] [1 2; 3 4]}' >> cellfun('size',a,1) ans = 1 2 For more: help cellfun

presque 13 ans il y a | 0

| A accepté

A résolu


Clock Hand Angle 1
Given a time in HH:MM:SS, find the smallest angle (in degrees) between the hour and minute hand

presque 13 ans il y a

A résolu


Find matching parenthesis
One of the most indispensable things about a great text editor for programming is the ability to quickly jump between matching p...

presque 13 ans il y a

A résolu


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

presque 13 ans il y a

A résolu


Can you beat the lottery?
Well this one you may not get every time, but it is a lottery! Here is the code that generates the lottery numbers (you can try ...

presque 13 ans il y a

Réponse apportée
set NaN as another color than default using imagesc
You can use the *isnan* function to find the indices of all NaNs, then set those elements to another value: Example: >>A...

presque 13 ans il y a | 0

A résolu


NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

presque 13 ans il y a

Réponse apportée
How to display image above threshold?
mask = rawImage > N; %simple thresholding--adjust for your needs maskedImage = rawImage; %copy image maskedI...

presque 13 ans il y a | 1

A résolu


Equidistant numbers containing certain value in an interval
Given a lower and upper bound of an interval, distance between numbers, and one particular number from that interval, create an ...

presque 13 ans il y a

A résolu


Wilf-Zeilberger pairs
Take as inputs two functions _F_ and _G_, and two scalar values _n_ and _k_. Test whether the functions are candidates to be a W...

presque 13 ans il y a

A résolu


Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

presque 13 ans il y a

A résolu


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

presque 13 ans il y a

A résolu


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

presque 13 ans il y a

A résolu


"Look and say" sequence
What's the next number in this sequence? * [0] * [1 0] * [1 1 1 0] * [3 1 1 0] * [1 3 2 1 1 0] This a variant on the w...

presque 13 ans il y a

A résolu


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

presque 13 ans il y a

A résolu


Create a function handle that reverses the input arguments of another function handle
Given a function that takes two input arguments and returns one output, create another function handle that performs the same op...

presque 13 ans il y a

A résolu


Convert String to Morse Code
Convert a given string to international <http://en.wikipedia.org/wiki/Morse_code Morse Code> * Strings will only have [A-z], ...

presque 13 ans il y a

A résolu


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

presque 13 ans il y a

Réponse apportée
GUI 'uitable' with option to add or remove rows depending on 'textbox' value
It looks like you just need to put the following i the callback of your editbox (I'm assuming you meant editbox instead of textb...

presque 13 ans il y a | 2

| A accepté

Réponse apportée
How to I plot this?
Does this do what you need? X = [1 2 3 1 1; 6 6 6 2 1; 9 8 7 1 0; 3 3 3 2 0]; hold on plot(X...

presque 13 ans il y a | 1

Réponse apportée
popupmenu in GUI, string call backs.
Are you using GUIDE for this GUI? If so, you'll need to access the "value" property of each of your popupmenus from within your ...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
How to use axis(axis_handle...)?
Try putting your desired axis bounds inside a bracket. Axis accepts this as a single argument rather than four. axis(axes_ha...

presque 13 ans il y a | 0

| A accepté

Charger plus