Answered

Assistance with creating multidimensional matrices

I would pre-allocate A before the for loop by using A = zeros(Rows,Cols); %Creates matrix of 0's % This will also act to c...

Assistance with creating multidimensional matrices

I would pre-allocate A before the for loop by using A = zeros(Rows,Cols); %Creates matrix of 0's % This will also act to c...

circa 10 anni ago | 0

| accepted

Answered

change Black and White - Image to Black & Red Image

You need to define the colormap: imshow(BW,[0 0 0; 1 0 0]) % 0's are black and 1's are red

change Black and White - Image to Black & Red Image

You need to define the colormap: imshow(BW,[0 0 0; 1 0 0]) % 0's are black and 1's are red

circa 10 anni ago | 0

Solved

Nearest Numbers

Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

circa 10 anni ago

Answered

ellipses on image

Use <http://www.mathworks.com/help/toolbox/pde/ug/pdeellip.html pdeellip> (if you have the PDE toolbox): pdeellip(xc,yc,a,b,...

ellipses on image

Use <http://www.mathworks.com/help/toolbox/pde/ug/pdeellip.html pdeellip> (if you have the PDE toolbox): pdeellip(xc,yc,a,b,...

circa 10 anni ago | 0

Answered

MATLAB Answers Wish-list #2 (and bug reports)

How about a link on the left hand navigation for FAQ and posts like Walter's on tags?

MATLAB Answers Wish-list #2 (and bug reports)

How about a link on the left hand navigation for FAQ and posts like Walter's on tags?

circa 10 anni ago | 1

Solved

Summing digits

Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

circa 10 anni ago

Answered

add picture in matlab

do you have the image processing toolbox? if so: I = imread('imagename.extension'); The result will be a 2- or 3-D matri...

add picture in matlab

do you have the image processing toolbox? if so: I = imread('imagename.extension'); The result will be a 2- or 3-D matri...

circa 10 anni ago | 0

| accepted

Answered

cropping manually and automatic using matlab

*Manual method:* scenenum = input('Please enter the number of scenes you wish to crop: ') for m = 1:scenenum mask...

cropping manually and automatic using matlab

*Manual method:* scenenum = input('Please enter the number of scenes you wish to crop: ') for m = 1:scenenum mask...

circa 10 anni ago | 0

Solved

radius of a spherical planet

you just measured its surface area, that is the input.

circa 10 anni ago

Question

Creating vector of all numbers in a cell array.

This is probably an easy solution, but I cannot figure it out. I have an |m x m cell array| where each cell contains a |1 x ...

circa 10 anni ago | 3 answers | 0

Answered

Problem trying to access labeled portion of images (updated 7/5)

I switched to |*.**| over *|immultiply()|* and I haven't run into the error message again. This may not mean I am out of the wo...

Problem trying to access labeled portion of images (updated 7/5)

I switched to |*.**| over *|immultiply()|* and I haven't run into the error message again. This may not mean I am out of the wo...

circa 10 anni ago | 0

Solved

How to find the position of an element in a vector without using the find function

Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

circa 10 anni ago

Solved

Roll the Dice!

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

circa 10 anni ago

Solved

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

circa 10 anni ago

Solved

Sum all integers from 1 to 2^n

Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

circa 10 anni ago

Question

Problem trying to access labeled portion of images (updated 7/5)

*UPDATE:* <http://dl.dropbox.com/u/56764179/data_dump.mat data_dump.mat> unique(diff(unique(endpts_labeled))) ans = ...

circa 10 anni ago | 3 answers | 0

Solved

Who Has the Most Change?

You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

oltre 10 anni ago

Solved

Too mean-spirited

Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

oltre 10 anni ago

Solved

Distance walked 1D

Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

oltre 10 anni ago

Solved

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

oltre 10 anni ago

Solved

Swap the first and last columns

Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

oltre 10 anni ago

Solved

Make a checkerboard matrix

Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

oltre 10 anni ago

Answered

for loop doesn't seem to loop

You're not specifying the row of A that you are writing the data to, so each loop it just places [PVtech(i,:) WTtech(i,:)] into ...

for loop doesn't seem to loop

You're not specifying the row of A that you are writing the data to, so each loop it just places [PVtech(i,:) WTtech(i,:)] into ...

oltre 10 anni ago | 0

| accepted

Answered

How can I deblur an image given the original PSF?

<http://www.mathworks.com/help/toolbox/images/ref/deconvlucy.html doc deconvlucy> the documentation mentions similar functions....

How can I deblur an image given the original PSF?

<http://www.mathworks.com/help/toolbox/images/ref/deconvlucy.html doc deconvlucy> the documentation mentions similar functions....

oltre 10 anni ago | 0

| accepted

Answered

Delete unique element in column

Based off of Jan's answer: A = [1 2; 1 3; 3 4]; [B, I, J] = unique(A(:,1),'last'); NewMatrix = A(I,:);

Delete unique element in column

Based off of Jan's answer: A = [1 2; 1 3; 3 4]; [B, I, J] = unique(A(:,1),'last'); NewMatrix = A(I,:);

oltre 10 anni ago | 0

Answered

How to implement 'Medfilt1' function into Simulink

If you have the Video and Image Processing Blockset, use the 2D median filter and change the "Neighborhood size" to 1xN or Nx1 (...

How to implement 'Medfilt1' function into Simulink

If you have the Video and Image Processing Blockset, use the 2D median filter and change the "Neighborhood size" to 1xN or Nx1 (...

oltre 10 anni ago | 1

| accepted

Answered

If condition without loop

A(A>0 & A<=1) = 1; A(A>1 & <=2) = 2; Of course if you'd like to do this continuously (constantly rounding values, not ju...

If condition without loop

A(A>0 & A<=1) = 1; A(A>1 & <=2) = 2; Of course if you'd like to do this continuously (constantly rounding values, not ju...

oltre 10 anni ago | 0

Answered

me not like new lay out of this section! (not a question)

What is the value of having a *"Home"* and *"Search"* link on the navigation panel (upper left hand side) if both link to the sa...

me not like new lay out of this section! (not a question)

What is the value of having a *"Home"* and *"Search"* link on the navigation panel (upper left hand side) if both link to the sa...

oltre 10 anni ago | 1