Answered
How do you use roifill if the mask you have specifies all the pixels you want replaced
You could dilate the mask to make it bigger or use the distance transform to identify pixels within _n_ pixels of your mask. ...

13 years ago | 0

| accepted

Answered
Working with numbers smaller tha 10^-308
You can do this using |vpa()| in the Symbolic Math Toolbox: v = vpa('3.14159^-5000') And for more info: <http://www.m...

13 years ago | 2

Answered
Undefined variable "matlab" or function "matlab.apputil.create" Error with Package App
Seems like a path issue. First try: rehash toolboxcache If that doesn't work, restoredefaultpath;rehash toolboxc...

13 years ago | 0

Answered
Summing with respect to values within variable instead of rows, columns, or equal windows
a=[ 1 0.3 1 0.1 2 0.7 2 0.6 2 0.3 2 0.9 3 0.5 4 0.8 4 0.1 5 0.1 5 0.9 5 0.4] uv = u...

13 years ago | 1

| accepted

Answered
how can I create a vector with unknown length?
xsorted = sortrows(x(:),-1)

13 years ago | 0

Answered
Matrix of functions of two variables
F = bsxfun(@times,t1,t2) And for more info: doc bsxfun

13 years ago | 0

Answered
Keyboard Shortcut for Function Hints
*ctrl + F1* I remember how excited I was when I discovered that gem...

13 years ago | 3

| accepted

Answered
Matlab GUI non-tag item supported?
You could remove them from handles in the GUI OpeningFcn. Why is it bad if _handles_ has extra unused fields? These are scal...

13 years ago | 0

| accepted

Answered
I want to setting my X-axis plot
When I copy your code I get an error. Anyway you can use any either of the following to adjust the axes limits: doc axis ...

13 years ago | 0

| accepted

Answered
Matlab standalone executable run on computers which don't have matlab installed
For the first part of your question: Do the other computers have the <http://www.mathworks.com/help/releases/R2013a/compiler/...

13 years ago | 0

Answered
why is parfor slower than for?
First, do you have a |matlabpool| open? If no matlabpool is open then the |parfor| loop will not be run in parallel anyway. ...

13 years ago | 4

Answered
Loop multiple plots single figure 3D matrix
figure hold on for ii = 1:6 plot(gjG(11,:,ii)); end hold off

13 years ago | 0

| accepted

Answered
How do I optimise a nonlinear objective function which doesn't have an analytical expression
The objective function doesn't have to have an analytical expression. Write the function you wish to optimize as a function and...

13 years ago | 1

| accepted

Answered
mkdir with variable name
See the first example here: <http://www.mathworks.com/matlabcentral/answers/57446> You're close: mkdir(['c:' 'c:\...\...

13 years ago | 1

| accepted

Answered
Convert daily prices to monthly returns
First, |tomonthly| is a method of a _fints_ object. Thus you first have to create an object of this type: doc fints If ...

13 years ago | 0

Answered
Remove an item in legend
How abotu just calling legend again without the input for the line you don't want: hLine = plot(1:10,1:10,'r-',1:10,10:-1:...

13 years ago | 0

Answered
How to make .m to executable files?
Yes. You can do this using |deploytool| and the <http://www.mathworks.com/help/releases/R2013a/compiler/index.html MATLAB Compi...

13 years ago | 0

| accepted

Answered
setappdate getappdata GUI - help
"setappdat *e*" vs. "setappdat *a*" ?

13 years ago | 0

| accepted

Answered
HMM with 41 states error occurs
MATLAB uses 1-based indexing not zero. In order to reference the 39th element in the first column: tr(39,1) Please post...

13 years ago | 0

Answered
elementwise If statement, then apply an equation/function only to the elements that meet the criteria
For this specific example: x = magic(3)-5; idx = sign(x); x(idx==1) = x(idx==1).^2; x(idx==-1) = x(idx==-1).^3; I...

13 years ago | 1

| accepted

Answered
imfreehand or imrect -- snap to pixels while drawing
You can do this using the |setConstrainedPosition()| method of the object. How are you getting the area for the rectangle? ...

13 years ago | 0

Answered
resampling DEM using imresize in a for loop = cell array?
What is out before the loop starts? You should preallocate it as a cell: out = cell(3,1); for ii = 1:3 out{ii} = i...

13 years ago | 0

| accepted

Answered
Matlab publish - sections inside loop
This does sound like an ideal task for the <http://www.mathworks.com/help/releases/R2013a/rptgen/index.html MATLAB Report Genera...

13 years ago | 0

Answered
Questions About MENU Function
How about using a GUI with six radio buttons? function choices = simpleRadioGUI hFig = figure('WindowStyle','modal')...

13 years ago | 0

Answered
let small numbers in Matrix be zero
A(A<15) = 0; Use logical indexing.

13 years ago | 5

| accepted

Answered
How can I extract the largest blob in a binary image
Here's the function I wrote to do this. You can also use the example in the "tips section of the doc for |regionprops| which ex...

13 years ago | 0

Answered
How do I get rid of the window that pops up showing a variables' value when I have passed over it.
In R2012b or greater: Editor Tab -> View -> Enable Datatips while editing (right side) In releases prior to R2012b: ...

13 years ago | 0

| accepted

Answered
Constantly updated gui question
Use a |timer| to scrape the serial port at fixed time intervals and have this update the _'*Data'_ properties of the lines or ot...

13 years ago | 0

| accepted

Answered
Create array u(i) that is max of array x(i) and y(i)
x = rand(10,10,10); y = rand(10,10,10); mxy = max(x,y) |max()| works directly on n-dimensional arrays. doc max We...

13 years ago | 0

Answered
How to avoid for loops when generating index arrays?
doc meshgrid doc ndgrid %? :) And of course, depending on your application, two nested |for|-loops or |bsxfun()| might ...

13 years ago | 0

Load more