Community Profile

Contact

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

2

Answered 2 years ago

if I try to plot the following: plot(0.5,0.5) Is there any way to specify what handle the object will have while using ...

2 Answers

0

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

Solve this!

1

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

1 Answers

let's say i have the image: img = [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...

3 Answers

go = true; while go step1 step2 step3 if step3==stopcriteria go=false end ...

accepted

make a structured variable for t=1:n^2 V(t).matrix=zeros(n); end Call them by V(t).matrix 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...

plot(C,A) you can plot anything against anything else. If A and C correspond to the same values of B then the above code sh...

im2col(a,[64 64],'distinct') 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 set(gca,'property','value','property2','value2') 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 a(a>threshold)=0; or try max(a,threshold); 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. Exampl...

Reverse the vector elements. Example: 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] Example: Input a = ...

Load more