Answered
How can I build a 3D volume from Dicom files ?
My answer here may interest you: <http://www.mathworks.com/matlabcentral/answers/43386#answer_53269> If it doesn't answer ...

14 years ago | 0

Answered
How to count consuctive 0's inbetween values of 1
v = [0; 1; 0; 0; 0; 1; 0; 1; 1; 1; 0; 0; 0; 1; 0; 1; 1; 0; 0;1]; vzcount = diff(find([1;v;1]))-1; %find ones in a [1;v;1] ve...

14 years ago | 0

Answered
X-axis labelling problem when plotting 3different series's representation into 2different y axes
You can explicitly grab the handle to the new x-axis and set it's _'XTickLabel'_ to []. ax = plotyy(etc); set(ax,'XTickLab...

14 years ago | 0

| accepted

Answered
Assign a letter to a set of (for example) real numbers?
m = 5; n = 6; a = 10; A = bsxfun(@(ii,jj)a./(ii + jj - 1),(1:m).',1:n)

14 years ago | 0

Answered
pause a Programming in matlab
You could also use a _modal_ dialog box ( |doc msgbox|) or if you have a regular figure |waitforbuttonpress|. These will requir...

14 years ago | 0

Answered
Wrap cell values in single quote so that regexprep works
How about: C = cellfun(@(x)num2str(x),C,'uni',false)

14 years ago | 1

| accepted

Answered
Indexing matrix using logicals
If you can guarantee that each row in A has *at least* one value greater than the threshold, you can use the index output from |...

14 years ago | 0

Answered
Write function to expand array and average adjacent entries.
I answered this here: <http://www.mathworks.nl/matlabcentral/answers/4929>

14 years ago | 0

Answered
Data not appearing in image
imshow(matrix,[]); %Use [] to show whole data range

14 years ago | 0

Question


How do I make the desired Regular Expression?
I am trying to use |regexprep| to remove certain parts of strings that meet a specific criteria. Here are the criteria in the b...

14 years ago | 1 answer | 0

1

answer

Answered
A guide to Tags
* "not a bug" For questions titled "Bug with ..." E.g. MATLAB bug (0.3 == 0.2+0.1) * "poofing" When users want to "poof" var...

14 years ago | 2

Answered
Testing for the presence of a substring in a cell array of strings
matches = strfind(x,'xc'); tf = any(vertcat(matches{:}))

14 years ago | 1

| accepted

Answered
draw ellipse in binary image
How about: doc imellipse (And specifically its method |createMask|)

14 years ago | 0

Answered
How to present two versions of instruction text at random?
Just looking at your error message: _error message on this: ??? Undefined function or method 'eq' for input arguments of type...

14 years ago | 0

Solved


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

14 years ago

Answered
how can i define a piecewise function in matlab
Use logical indexing, for this case, you don't even need to apply the logical indices: h = ~(x-w/2 <= d & d <= x+w/2);

14 years ago | 0

Answered
show identified object as a movie
doc VideoWriter There is an example in the doc for this or its method |writeVideo| that shows how to create a video from an...

14 years ago | 0

Answered
How to write a for-loop to find the limit of a function
This oughtta do it: for x = 1e40; mylim = (x^3+x^2-x)/(4*x^6+x^2); end

14 years ago | 0

Answered
Repeating elements in a vector
<http://www.mathworks.com/matlabcentral/fileexchange/6436-rude-a-pedestrian-run-length-decoder-encoder FEX:rude>

14 years ago | 1

Answered
Resize Font Column Header on uitable inside GUI
t = uitable('Data',magic(3)); set(t,'ColumnName',{'1','Hello','<html><h1>World</h1></html>'})

14 years ago | 0

| accepted

Answered
Improving For loops, Needs speed optimization
File reads take awhile. Read the whole thing in using |dlmread| and |reshape/transpose| as necessary. A |for|-loop over an exi...

14 years ago | 0

Answered
Cumulative If Loop question?
elseif 35350 <= income & income < 85660 taxrate= .28 taxpaid= (taxrate .* income) + income The math part of thi...

14 years ago | 0

| accepted

Answered
I have a Problem while using global variable.
This is a good reason to not use globals. Can you show us a snippet of your code? Have you seen: <http://www.mathworks....

14 years ago | 0

Answered
How do you write a function that will sort a one-dimensional array using looping and conditionals without using the sort or sortrow commands?
This oughtta do it. (And steal the win from Greg :) ) function v2 = MySort(v,direction) [~,~,idx] = unique(v(:)); v...

14 years ago | 1

| accepted

Answered
Questionable 2d interpolation results (TriScatteredInterp, griddata)
I would first recommend what Matt was suggesting about rotating your coordinate system to be the grid. This would not require t...

14 years ago | 0

Answered
Undefined function or variable 'network'
Try rehashing your toolbox path in case something got corrupted: rehash toolboxcache The class |network| should exist on...

14 years ago | 0

Answered
MATLAB R2012b - closing last tab closes Editor/Variables window
I don't believe so.

14 years ago | 0

Answered
Error with 'audiowrite' in R2012b
The error is occuring because the old _pathdef.m_ file is maintained between releases and thus the right plugin is not being use...

14 years ago | 2

| accepted

Answered
GUI Deployed into EXE is not working propaply
The Symbolic Math Toolbox cannot be deployed: <http://www.mathworks.com/products/ineligible_programs/>

14 years ago | 0

| accepted

Answered
Continuously pressing GUI slider arrow causes hanging
The _ButtonDownFcn_ is disabled if the |uicontrol| is enabled. What is the _BusyAction_ of the slider? If it is _cancel_ that ...

14 years ago | 0

| accepted

Load more