Answered
Get to selected 2d matrix from a 3d matrix
SLICES = mat(:,:,1:3:45);

15 years ago | 0

| accepted

Answered
how to search for bugs
<http://www.mathworks.com/search/advanced_search.html?query= Here> is a way to select Bug Reports, then do the search.

15 years ago | 0

Answered
loops
Is this what you are looking for? A=1.687; gamma=1.4; tol=1e-4; IDX = 0:.0001:2; z = zeros(1,length(IDX)); % Pre...

15 years ago | 0

Answered
For loope small increments
I don't know why you think this starts at 2.910. Perhaps you are running into the limit of your command window when trying to s...

15 years ago | 1

| accepted

Answered
Comparing two matriced
And a visual method: spy(A~=B) And a quick method to count the number of locations where A is not equal to B: nnz(A~=B)

15 years ago | 0

Answered
Need help in evaluating integral with quad
Or, you can do it in one shot with QUADV: th = 0.01:0.1:2*pi-0.01; f = @(x)(exp(-0.5*x).*sin(x*2*sin((th)/2))); born =...

15 years ago | 1

Answered
how to save a .mat file full of characters into a .txt file?
You don't say what form dictionary takes. Is it a cell array, a character array, or what? In general, use the FWRITE functio...

15 years ago | 1

Answered
Reading text from a txt file into a cell array
What does the data on each line look like? Does it follow a pattern? Post one of the lines if all lines follow a similar patte...

15 years ago | 1

Answered
Connect the dots
This problem might be solved more easily and efficiently, but this solution should get you through your example. Walter's conce...

15 years ago | 0

| accepted

Answered
Hump-day challenger - Recursion
O.k., here is something I do not understand. In trying to make the original algorithm I published (reproduced below) more effic...

15 years ago | 0

Answered
Hump-day challenger - Recursion
O.k., here is my other idea. It first sorts the array then uses a much more efficient recursive method than the algorithm I pos...

15 years ago | 1

Answered
Subplot in PlotButton Callback: Can a subplot be incorporated into the code of a plot button?
I think you must mean that you want a new subplot with each button press, is that correct? If so, do you want to limit the numb...

15 years ago | 0

Answered
Plot Button Callback: Labeling Resulting Plot Axes and Title
The TITLE, XLABEL and YLABEL functions all take an axes as the first argument. So after you do the plotting, call the functions...

15 years ago | 0

| accepted

Answered
Numerical integration of double integrals in MAtlab
Look at the TRAPZ function.

15 years ago | 0

Answered
Trouble with for loop
As others have suggested, this is not "trouble with a FOR loop," but trouble with the way you are approaching the problem. You ...

15 years ago | 0

Answered
What is the best way to rotate a 3D dataset about the Y axis
Use the ROTATE function. For help on how to use the function, type: help rotate

15 years ago | 0

Answered
Label a plot
Use the TEXT function. To see the help, use: help text In your case: z = 100; y=get(gca,'ylim'); h=plot([z z],y,'-r');...

15 years ago | 0

| accepted

Answered
Best File Exchange ever !!!
John D'Errico's <http://www.mathworks.com/matlabcentral/fileexchange/22725 Variable Precision Integer Arithmetic> toolbox is awe...

15 years ago | 3

Answered
Best File Exchange ever !!!
I hope it doesn't sound arrogant, but the only file from the FEX POTW which I *literally* use several times _every single day_ i...

15 years ago | 2

Answered
MATLAB File read Stuck on 1 Line
Why not just use the TEXTSCAN function instead of textread? This way you avoid the loop and read the whole file in one shot. J...

15 years ago | 0

Answered
Problem with plotting
For the first question, use the LEGEND command. L = length(get(axeshandle,'children')); legend([repmat('t',L,1),sprintf('...

15 years ago | 2

| accepted

Answered
field delimiter uses any char as to declare a new field instead of full string
Just so you understand what happened when you set the delimiter to 'locus=', MATLAB interprets the delimiter property as a list ...

15 years ago | 1

Answered
creating different arrays on the fly
Just in case you didn't read the link Paulo gave, DON'T DO THIS! You will end up way too many variables, then you will be ask...

15 years ago | 4

| accepted

Answered
Pulling specific data from a matrix, and starting a new matrix
Use the NNZ function to count the number of nonzeros. Use logical indexing to get the nonzeros. nzA = A(A~=0)

15 years ago | 0

Answered
Matlab delete values
A(find(A==T,1,'first')) = []; Or, you could just use Index directly: A(Index(1)) = [] And avoid the call to FIND and/or a...

15 years ago | 0

Answered
How to link the contain of one push button to another in MatLab GUI?
In the callback for the pushbutton, get the string and value of the listbox and use the value as an index into the string. C ...

15 years ago | 0

| accepted

Answered
Problems with while expression in a script
As Walter intimates, this is a floating point issue. Instead of using a tolerance, you might want to think about the problem at...

15 years ago | 0

Answered
Please help me creating help button please!!
For very complicated GUIs, why not just use another GUI as the helper? For example, just make another GUI which has different c...

15 years ago | 0

| accepted

Answered
How to interrupt the progrom in a GUI
You can call ctrl+c by using a Java Robot, but it won't do what you want. This is because the program which is running will pre...

15 years ago | 2

Answered
how do I modify the axis in plot(x,y)?
Is this more to your liking? x=[0.05 0.1 0.3 0.5 1 5 10 20 30 40 50]; y=[0.8 0.83 0.9 0.93 0.93 0.9 0.9 0.94 0.95 0...

15 years ago | 0

Load more