Answered
how to find mean value of alternate pixels in diagonal direction
x = magic(5); xd = diag(x); mean(xd(1:2:end))

14 years ago | 0

Answered
How to mirror image in MATLAB.
That looks right for the 1d case. You may wish to look at: |fliplr, flipud, flipdim|. If you open them up, e.g: open fl...

14 years ago | 0

Answered
image classification
Set up your classification as a fitness function to be minimized. Then feed this into |ga()|, the Global Optimization Toolbox's...

14 years ago | 0

Answered
Default Text Size in Legends
A |legend| is just a form of an |axes|, i.e: peaks; h = legend('peaks'); get(h,'type') And thus you would need to set ...

14 years ago | 1

Answered
pcolorm line has empty line at 0 deg. longitude
You need to explicitly tell MATLAB that you want it to wrap aroubnd by adding a 360 or a 0 ar the end of you longitude vector. ...

14 years ago | 0

Solved


QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...

14 years ago

Solved


Omit columns averages from a matrix
Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

14 years ago

Answered
How to make the x-axis on a logarithmic scale while keeping the y-axis in dB?
Wayne's method is probably best. However, if you need finer control you can set the |axes|' _xscale_ property to _log_. ...

14 years ago | 3

Answered
solving nonlinear equations
The expressions do nto need to be strings: syms w theta; eq1 = 0.0889+(-w^0.5*(w-1)^2*(w*(w+2)*sinh(3*theta)+3*sinh(theta)...

14 years ago | 0

Answered
Create an Array with Nested Loops
Could you boil this down to a small example? It looks like you're missing the ':' necessary to specify all columns or all rows....

14 years ago | 0

| accepted

Answered
difference matrix??
x = [1 5 8 3 6 7 4 5 2 6 8 1]'; sz = size(x); C = bsxfun(@minus,reshape(x,1,sz(1),sz(2)),resh...

14 years ago | 0

| accepted

Answered
Vectorizing the loop
x = w*bsxfun(@gt,A.',B)

14 years ago | 0

| accepted

Answered
trend line not drawing in sub-plot
You need to _hold on_ to your subplot! figure subplot(2,1,1) hold on plot (a,b); % plot trend line f = fittype('a*x+b'...

14 years ago | 0

| accepted

Answered
use of Slider with UI control
You could use _normalized_ figure units so that either the figure resizes or the edits resize based on the number of them.

14 years ago | 0

Answered
Optimization with integers only
This can be done with |ga()| in the Global Optimization Toolbox: <http://www.mathworks.com/help/toolbox/gads/bs1cibj.html>

14 years ago | 1

Answered
Having a logo or picture on my own GUI
Can you show us a screenshot of your GUI in GUIDE and point to the axes where you want your logo to go? It should be a litt...

14 years ago | 0

Answered
uibuttongroup with radiobuttons with GUIDE
that is wierd how the |SelectionChnageFcn| doesn't show up in the property inspector. If you add a uibuttongroup, or have one a...

14 years ago | 0

| accepted

Answered
Returning values in a GUI Callback
_most_ Callbacks do not return output arguments. What it looks like you want it for the UICONTROL, upon being pushed, to return...

14 years ago | 1

Answered
For Loop with index inside of a Matrix
It looks like you are tring to stuff a 6x6 matrix into a 1x6 vector, hence the error. Use dbstop if error then run your...

14 years ago | 0

| accepted

Answered
Remove zero entries from cell arrays
points = {[-24.7697910000000,-15.8191235000000],0,[-12.6771670000000,20.4587480000000],0;0,[-20.6771670000000,-3.5412520000000...

14 years ago | 0

| accepted

Solved


radius of a spherical planet
you just measured its surface area, that is the input.

14 years ago

Answered
image difference
doc imsubtract doc imabsdiff Some places to look...

14 years ago | 0

Answered
Debugging
kepler(exp(1),4) kepler(exp(1),magic(4)) works for me...

14 years ago | 1

| accepted

Answered
filter function - delay at the first run
That is likely the JIT compiler taking a little extra time on the first iteration but then being much slower. What does the t...

14 years ago | 0

Answered
Newbie: Euclidean distance of a matrix??
Following your rules: X=[5 3 1; 2 5 6; 1 3 2]; %sample matrix myEdist = squeeze(sqrt(sum(bsxfun(@minus,X,reshape(X',1,size...

14 years ago | 0

| accepted

Answered
Inserting a picture on a GUI
<http://www.mathworks.com/matlabcentral/fileexchange/24861-41-complete-gui-examples GUI40>

14 years ago | 1

Solved


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

14 years ago

Answered
Trapezium and Simpson's Rule, plotting graphically
doc trapz %or cumtrapz What have you done thus far for simpson's rule?

14 years ago | 0

Answered
Changing function with Iteration
# <http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F FAQ a1 a2 an> # doc persistent...

14 years ago | 0

Load more