Answered
Principle Component Analysis
If your data are in the matrix |X| and |ndim| is the number of attributes you want to retain, then you can use [residuals,r...

15 years ago | 0

| accepted

Answered
Searching the contents of a file with items in a second file
The file reading is fine (except that it would be better to use len1 = length(A) len2 = length(B) so that |len1| and |len2...

15 years ago | 0

Answered
Linear programming otimization table error
Yes, this ominous-sounding message just means that the optimal solution has been reached. If you don't like it, you could use |o...

15 years ago | 0

| accepted

Answered
Characters linear search
You can use <http://www.mathworks.com/help/techdoc/matlab_prog/br04bw6-98.html#br1zm43-1 cell arrays> and <http://www.mathworks....

15 years ago | 0

| accepted

Answered
How to add a title and logo to a figure with multiple plots?
The title part is easy enough. Just download <http://www.mathworks.com/matlabcentral/fileexchange/7772-suplabel suplabel> from t...

15 years ago | 1

Answered
loop error
You're creating T on each iteration of the loop. Remove T = cell(a,L); and put T = cell(N-L*4,L); above |for a=1...

15 years ago | 0

| accepted

Answered
Genetic Algorithm
The first thing you need is to read in the data using |xlsread| and put it in the variable |Measured_data|. Then you can create ...

15 years ago | 0

Answered
Publish function code
I haven't found an easy way to do this, and I hope someone else can improve on my answer. Here's my approach, which requires som...

15 years ago | 0

| accepted

Answered
creating GUI for my program
You can find a list of resources for learning how to use GUIs at <http://blogs.mathworks.com/steve/matlab-gui-programming-resour...

15 years ago | 0

Answered
increase size of uitable dynamically
Here is a simple example of a function that will create a table with a blank row and add rows as you go. I have chosen to add a ...

15 years ago | 0

Answered
Overload get(0, 'MonitorPositions')
The underlying code is Java. You could try looking in the <http://undocumentedmatlab.com/ Undocumented Matlab site>.

15 years ago | 1

Answered
Overload get(0, 'MonitorPositions')
If the code is positioning windows, maybe you can follow the advice of <http://www.mathworks.com/support/solutions/en/data/1-324...

15 years ago | 1

Answered
generating the list of permutations
See <http://www.mathworks.com/help/techdoc/ref/perms.html All possible permutations>.

15 years ago | 0

| accepted

Answered
Expected value in matlab?
In general, no. It depends on the statistical distribution for these numbers (see, for example, <http://en.wikipedia.org/wiki/Ex...

15 years ago | 2

Answered
Overload get(0, 'MonitorPositions')
Judging by the documentation for <http://www.mathworks.com/help/techdoc/ref/rootobject_props.html Root properties>, MATLAB does ...

15 years ago | 1

Answered
error for Index exceeds matrix dimensions
You just need to replace those round brackets by curly ones: for k=1:length(X0); %X0 is a 1xN cell,N is an unknown number. ...

15 years ago | 0

Answered
problem solving a partial differential equation using pdepe
The problem is that you use global variables in your functions without declaring them in your command window first. Put globa...

15 years ago | 0

| accepted

Answered
Multicollinearity / Collinearity Problem
<http://www.mathworks.com/products/statistics/demos.html?file=/products/demos/shipping/stats/plspcrdemo.html Partial Least Squar...

15 years ago | 1

Answered
fsolve with three anonymous functions
The full message is ??? Error using ==> lsqfcnchk at 117 FUN must be a function or an inline object; or, FUN may be a cell a...

15 years ago | 0

Answered
Writing "this" class' properties?
I'm just guessing at what you're trying to do, but here is a different version of your method: function y=ChangeProperties(th...

15 years ago | 1

| accepted

Answered
Help with basic code
Here is some code that solves the problem and also illustrates an important programming principle: when you create a function, i...

15 years ago | 1

| accepted

Answered
Help with basic code
@Susan, thank you for formatting the code nicely. I wish more people would in their questions! I notice your function doesn't ...

15 years ago | 0

Answered
Email retrieval through Matlab
Check out <http://www.mathworks.com/matlabcentral/newsreader/view_thread/296074 this previous discussion>.

15 years ago | 1

Answered
Textures for bar plots
<http://www.mathworks.com/matlabcentral/fileexchange/30733-hatchfill Hatchfill>, from the File Exchange, finds the patch objects...

15 years ago | 0

Answered
Linear programming (having upper and lower limit)
I assume that the above code is not working because you don't have the <http://www.mathworks.com/products/optimization/ Optimiza...

15 years ago | 0

Answered
Direction of display of loop
How about this? t = linspace(0,2*pi); x = cos(t)*sqrt(5); y = sin(t)*sqrt(5/2); plot(x,y); hold on quiver(x(1),y(1),x(2...

15 years ago | 0

| accepted

Answered
Anyone listening for a particular event?
@Joan, This is an interesting problem! I don't know what the ideal solution is, but maybe you could create three classes: |subsc...

15 years ago | 1

| accepted

Answered
integrating discontinuous function
Did you define your symbolic variables first? syms a x y p You'll need to give a numeric value for |p| or else |int| won't b...

15 years ago | 0

Answered
Efficiently converting a 3d matrix to a 2d matrix
You can do it with cell arrays: Acell = num2cell(A,[1 2]); % put each page of A into a cell Acell = reshape(Acell,size(A,3),1...

15 years ago | 5

Answered
Goal Seeking
If you have the Symbolic Toolbox, <http://www.mathworks.com/help/toolbox/optim/ug/fgoalattain.html fgoalattain> will do it.

15 years ago | 0

Load more