Answered
Creating movies from surface maps
* Force the figure to be a certain size with units pixels, put a set of axes onto it in a certain position. Then use the rectan...

14 years ago | 0

Answered
pso algorithm
Yes you can. The only way you couldn't would be: * It's OS dependant and you're on the wrong one. * It requires products you...

14 years ago | 0

Answered
Optimization of values of L and C for an active power filter
<http://www.mathworks.com/matlabcentral/fileexchange/?term=pso FEX:Search:pso> Might be a good place to start.

14 years ago | 0

Answered
How to get the base workspace varibles in a function
[x y] = foo(r,s,t,u,v) Calling from a script of the command line will pass base variables _r,s,t,u,v_ into foo and return _x,...

14 years ago | 0

Answered
Concatenate
This makes the 5x3 that you requested. c1 = {'hello' 'world' 'Happy Tuesday'}; c2 = {'Need' 'coffee' 'now'}; m1 = magic(3);...

14 years ago | 0

| accepted

Answered
Unable to meet integration tolerances.
iskeyword function _ans = 1_ I'm surprised it even let you call it that way. You cannont name a function _function_ since i...

14 years ago | 0

Answered
Finding closest points to a given range in matrix
A =[ 0.375 0.279 0.366 0.004 0.256 0.321 0.004 0.266 0.322 0.004 0.276 0.333 0.004 0.286 0.338 0.004 -0.687 0.2...

14 years ago | 0

| accepted

Answered
how I can access to inputs for rotatefactors fun.?
What's wrong with: rotatefactors(magic(10),'method','varimax') ? Note, this uses the defaulty parameters for _reltol,no...

14 years ago | 0

Answered
how to do the distance transform
showing ~D means that only distances equal to zero (i.e. points that are true in I2) will be shown. D is an array of doubles. ...

14 years ago | 0

| accepted

Answered
Negating negative values in a matrix using for and if loops in Matlab
mean_without_negatives = mean(m(m>=0));

14 years ago | 0

| accepted

Answered
minimum of an array
A = [999, 25.019, 1.414, 25.806, 1.414, 3.316, 4.472, 29.782, 26.248, 28.248 25.019, 999, 25.059, 5.291, 25.495, 25.278, 25...

14 years ago | 2

Answered
Function that plots for each point two vectors representing two different values
Overlay two quiver plots on each other with velocity being the component? Please clarify, or even better - show us a picture of...

14 years ago | 0

Answered
How to shift diffrent rows with diffrent shift positions in matlab?
Without looking too much into your code, it looks like |circshift| might be your friend. doc circshift

14 years ago | 0

Answered
There's a function to create handles and to set their tag?
Instead of having pba pbb pbc, use a cell array or even a vector to store their handles. That way you can do things with them a...

14 years ago | 0

Answered
how to plot line profiles in 3D
|mesh| will do that with the appropriate settings. doc mesh

14 years ago | 0

Answered
File manipulation
Hmm. One way would be to have a variable that is the index to the files you wish to open. Run a for-loop that traverses that v...

14 years ago | 0

Answered
Extrapolating an image to give different resolution
doc interp2 %slicewise doc interp3 %volumewise Places to start.

14 years ago | 0

Answered
how to forbid several calls to the same function
One way would be to save the figure and then use the |openfig|, with the _reuse_ option. doc openfig

14 years ago | 0

Answered
surf plot won't happen because i need a matrix?
That is correct. Use |meshgrid| to generate index matrices e.g.: [xx yy] = meshgrid(linspace(-pi,pi,10)); surf(xx,yy,sin(...

14 years ago | 0

| accepted

Answered
How do I fix the error Function definitions are not permitted at the prompt or in scripts.
Write in in an editor file and save it as the title of function, e.g: function hello_world(hObject,evt) fprintf(2,'Hel...

14 years ago | 0

Answered
Suggestions for a non-zero counter
well how about nnz (number non-zeros)! doc nnz; or sum(sum(logical(A));

14 years ago | 1

| accepted

Answered
how to organize your code in blocks
docsearch editing code

14 years ago | 0

Answered
standard deviation of image
You can use |regionprops| to calculate the various fields requested of each label in a label image, e.g.: A = uint8(rand(10)...

14 years ago | 0

Answered
converting a cell array into numeric arrays
Just use |cellfun| with |imhist| as the function being applied. As for the two dimensionality, use |rgb2gray| to convert your...

14 years ago | 0

| accepted

Answered
underline a letter in the label of an uimenu object
It doesn't appear to be possible since there is no _'interpretter'_ option (the ability to add LaTeX). (Though you use a _'sepa...

14 years ago | 0

| accepted

Answered
4 noded shell element with 6dof
A starting point for an element stiffness matrix K_el = zeros(24); %4nodes@6dof/node This will be a very weak element u...

14 years ago | 0

| accepted

Answered
Sobel Edge Thresholds
Have you looked at the output for fspecial('sobel') I would recommend using a |for|-loop to traverse a few values to hon...

14 years ago | 0

Answered
Zooming resizes axes
*UPDATE* Add this to the bottom of your mfile: %Setup set(S.ax,'ylimmode','auto','xlimmode','auto'); %reset after ...

14 years ago | 1

| accepted

Answered
image comparisson matlab
The simplest test to measure digital equality is to find out if they're equal: doc isequal

14 years ago | 1

| accepted

Answered
Changing the dimension of a data set
doc permute specifically: b = permtue(b,[2 1 3]);

14 years ago | 1

| accepted

Load more