Answered
Question on Graphing / Plotting
You're likely looking for |ezplot|. Regular plot doesn't play well with syms: syms x Y = sin(x); dY = diff(Y); ezplot(Y...

13 years ago | 0

| accepted

Answered
Plot contour lines on top of imagesc?
You can specify x/y for |imagesc| so that the image is not shown against its index. From there you can simply use |hold on| and...

13 years ago | 0

| accepted

Answered
Extremely slow imshow() when using 16-bit images
X = uint16(rand(1000)*60000); t = 0; figure;ax = axes; for ii = 1:10 tic; imshow(X,'parent',ax); drawnow; ...

13 years ago | 0

Answered
An easy Array question
Are you sure you need a cell array? I would just use a |for|-loop and loop over the start and end indices: sidx = start ...

13 years ago | 0

Answered
how to run selected text in 2012b editor?
# Select *.m file text # Right click # Evaluate selection or hit F9 isn't working? If it isn't you'll have to go into _...

13 years ago | 4

| accepted

Answered
MODLAND Tile Calculator MATLAB
It looks like you probably want <http://www.mathworks.com/help/releases/R2012b/map/ref/mfwdtran.html |mfwdtran()|> and friends (...

13 years ago | 0

Answered
[Medical images] How to get a 3D model from a CT (DICOM) using Matlab.
For reading the dicom files into MATLAB, I would start with one of these utilities: <http://www.mathworks.com/matlabcentral/f...

13 years ago | 0

Answered
How to vectorize a find
If you only have zeros and ones and you are *positive* there is atleast one one, then you can use the second output from |max()|...

13 years ago | 0

Answered
How to create a vectorfield?
doc meshgrid doc quiver3 doc coneplot Not sure of the details of what you want but it's likely some combination of the ab...

13 years ago | 0

Answered
GUI Keyboard Commands HELP
Yes! You need to steal focu back to the figure from whatever |uicontrol/uipanel/axes/etc.| has stolen it. To do this, at t...

13 years ago | 0

| accepted

Answered
Preallocation for a cell help needed
It sounds like you should assign an empty cell to each value: S = struct('field1',cell(10,1)); You can then fill in the ...

13 years ago | 0

| accepted

Answered
Does logical indexing have a direct inverse?
I.e: A(X~=0) = B ?

13 years ago | 0

Answered
Assistance with simple error
And in MuPAD, all you have to do is paste what you have above into a code line.

13 years ago | 0

Answered
Help with matrix manipulation
cell2mat(rotated) ?

13 years ago | 1

| accepted

Answered
my own imhist function error
This oughtta make it pretty clear: im2double(uint8(1:10:255))

13 years ago | 0

| accepted

Answered
Color map and color bar of the overlaid index image on a gray scale background image?
You will need to set the the _'ylim'_ of the colorbar to only be the range of the indexed image and you will have to adjust the ...

13 years ago | 0

Answered
any faster implementation for 2D interpolation by column
Are all columns of _X,Xi_ the same? If so, |interp1| can handle the matrices directly: x = (1:3).'; y = magic(3); xi = [...

13 years ago | 0

Answered
How do I define a structure that has an element which is an array?
total_payroll = total_payroll + personnel.name(i).salary; _total_payroll_ is never defined before being used for the first...

13 years ago | 0

Answered
Plotting with true colors in an uneven grid
|pcolor| is just creating a surface so you could do this explicitly yourself and then view it in two dimensions: surf(xmesh...

13 years ago | 0

| accepted

Answered
How to pass the name of a file to a function - dataset
Two things: 1) Apparently the file _tryB.m_ is not saved on your ML path. Add the folder it's in to the path 2) |inputn...

13 years ago | 0

| accepted

Answered
How to Downsample image in both Horizontal and Vertical Direction
For grayscale: Xdown = X(1:2:end,1:2:end); If it's RGB, keep the third dimension: Xdown = X(1:2:end,1:2:end,:);

13 years ago | 5

| accepted

Answered
Using an empty matrix as an Index
What do you expect it to return? If it's not being indexed by anything then it shouldn't extract anything. Perhaps this will l...

13 years ago | 2

Solved


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

13 years ago

Answered
Filtering a matrix with different rules for each columns
Vectorized with logical indexing: C = AB(AB(:,1)>0.5 & AB(:,2)<0.2,:);

13 years ago | 2

| accepted

Answered
how to detect folder address
doc dir Is probably the individual most important since it gives you everything the folder. These may help as well: ...

13 years ago | 0

| accepted

Answered
Error: Contour endpoints and waypoints must be finite.
It looks like it's complaining about this line: Cv(t) = (Cpi(t)-R) + (T(t).*integral(SecondDerivative,Inf,v(t))); becaus...

13 years ago | 0

Answered
Question about ordering and sorting matrices
Well first, you'll have to use |hex2dec| to get the hexadecimals to decimals. Second, can you make a smaller example of what ...

13 years ago | 0

Answered
Invalid File Identifer - Help
What is the value of _fid_? I'll assume it's negative and you can likely find the explanation in: doc fopen I.e. try ...

13 years ago | 0

| accepted

Answered
Data extraction from CSV file
Are you using R2012b? If so - use the Import Wizard. Click *"Import Data"* on the home tab and if the *.csv file has any str...

13 years ago | 0

Load more