Top 1% contributor
if the camera is static, take a blank image and subtract it from the live feed to get a rough idea of what pixel values have cha...
Answered 2 years ago
if I try to plot the following:
Is there any way to specify what handle the object will have while using ...
Asked 2 years ago
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so:
m=[1 3 6 9 11;
3 6 9 11 0;
6 9 ...
3 years ago
So, I noticed that you can't cntr + c out of the sound playback from soundsc. Is there a way to kill the horrible noises I'm mak...
let's say i have the image:
[1 0 -1;
0 -1 0;
1 1 -1];
and I'd like to get the values on the 8-connected...
I have a vector of enemy handles so that I can assign visibility to certain enemies and not others, but once I update all of the...
go = true;
make a structured variable
Call them by
and get spec...
I agree with Image Analyst. Is your image a jpg or has it been compressed? If so, there are little ghosts that lurk as low inten...
you can plot anything against anything else. If A and C correspond to the same values of B then the above code sh...
will give you your blocks as columns that you just need to reshape into squares again. I can't h...
I made a script which uses
and changes the default plot to look nicer. ...
it makes it '3d'
what if you did this:
matrix = [matrix; (button input)];
so m = [1 2 3] would go to
m = [1 2 3; 4 5 6]
with [4 5 6...
if your image is 'a', try
which makes the values equal to your thre...
I'm kind of confused here. you have a 3d plot with 2-d data? can you just set the third vector as zeros and use hold to plot it ...
I find it easier to write separate functions and then just call them as needed with some big script or function instead of copy ...
Answered 3 years ago
that used to happen to me when running scripts, so I switched to only using functions to get graphs and it went away. why? I don...
Given the dimensions of a 2-d plane, create a matrix where a "snake" of ones occupies the plane from top left to bottom right.
is there a nice way to get the line of sight from one pixel to the remaining pixels in an image? like if I had a binary image of...
Given a string such as
s = '011110010000000100010111'
find the length of the longest string of consecutive 1's. In this examp...
12 months ago
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point.
Reverse the vector elements.
Input x = [1,2,3,4,5,6,7,8,9]
Output y = [9,8,7,6,5,4,3,2,1]
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...
Picture a chessboard populated with a number of queens (i.e. pieces that can move like a queen in chess). The board is a matrix,...
Given a matrix A that represents the state of <http://en.wikipedia.org/wiki/Conway's_Game_of_Life Conway's game of Life> at one ...
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...
Given an amount of currency, return a vector of this form:
[100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01]
Input a = ...
Join the conversation