Answered
vectorizing a script with cellfun
It looks like you could wrap |cellfun| around that instead of a |for|-loop. I'm obligated to remind you that well written |fo...

14 years ago | 2

Answered
genetic algorithm
doc ga

14 years ago | 1

| accepted

Answered
How do I create a vector with a multiply sequence?
vector = 0.7.^(0:9)*100 And golf: v=.7.^(0:9)*100

14 years ago | 2

Answered
Using while loop
That's what it does anyway. Maybe this will help explain: M = magic(5) while ~isempty(M) M(1,:) = [] end

14 years ago | 0

Answered
Visualizing a 3D grain pack model using as input - pore and throat data
doc isosurface doc patch doc slice This will be your friend: <http://www.mathworks.com/matlabcentral/fileexchange/764-...

14 years ago | 0

Answered
Update figure in background without stealing focus?
How are you updating the figure? For example this little function with a timer that updates a plot doesn't steal focus from me....

14 years ago | 1

| accepted

Answered
arrayfun num2cell structure
Something like: x.a = num2cell(pi*ones(4,1)); x.b = {'hello'; 'world';'Tuesday';'coffee'}; x.c = num2cell((1:4).') y...

14 years ago | 0

Solved


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

14 years ago

Answered
Do a cross-set operation on a matrix
A = [1 2 3; 4 5 6]; %data [xx yy zz] = meshgrid(1:2,3:4,5:6); %column-wise linear indices B = [A(xx(:)) A(yy(:)) A(zz(:))] %...

14 years ago | 0

| accepted

Answered
Matrix Standard Deviation in 3D neighborhood
|stdfilt()| will ignore the three-dimensional component if you tell it to: x3 = stdfilt(repmat(magic(10),[1 1 3]),ones(3,3,...

14 years ago | 0

Answered
Execute multiple statements within an 'if' construct
Use either RGB triplets (e.g. [1 0 0] for red) or one of the letters abbreviated in: doc linespec e.g. 'r' for 'red' ...

14 years ago | 0

| accepted

Answered
Using fsolve for an underdetermined system
From the doc: doc fsolve _The Algorithm option specifies a preference for which algorithm to use. It is only a preferenc...

14 years ago | 0

Answered
How to Migrate the Preferences Folder and its Files when updating Matlab?
Copy the contents of: prefdir in the old release to those in |prefdir| of the new release. Is this what you mean?

14 years ago | 0

Answered
How to check the current line (debug)
Perhaps |dbstack()|? doc dbstack

14 years ago | 2

| accepted

Answered
run m-file from push button in Matlab GUI
Put: untitled In the callback function of the pusbutton. *More per Feedback* If no error is being thrown then it i...

14 years ago | 2

| accepted

Answered
Large array
How are you plotting? What is the _best_ way to visualize your data that requires minimal memory? The best way would probabl...

14 years ago | 0

| accepted

Answered
Bar graphed 'stack' option
If you want to see the sum, then you'll need to feed the sum of A into |bar()| bar(sum(A,2),'stacked')

14 years ago | 0

Answered
Curl Function to Plot CFD output: Data - [x y x Ux Uy Uz]
So each columne of the 26683x6 matrix represents one of the coordinates or components? Are x/y/z monotonic? If so, you shoul...

14 years ago | 0

| accepted

Solved


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

14 years ago

Solved


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

14 years ago

Answered
How to solve b≤Cx≤z with linear programming?
%Cx<z %Cx>b C = rand(5); b = (1:5)'; z = (11:15)'; x = [C;C]\[z; b] constraintsMet = all(C*x>=b)&&all(C*x<z) Mayb...

14 years ago | 0

Answered
How to run a script name inputed by the user within a script.
doc run

14 years ago | 1

| accepted

Answered
floating point precision
I'm not toally clear on your question. If you're looking to see if something is _close_ to 1, isclose21 = abs(x-1)<1^-10; ...

14 years ago | 0

Answered
Curve smoothing using Matlab
How about |smooth()| :) doc smooth

14 years ago | 0

Answered
Electrical Resistance - Left Division Method
<http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F FAQ> Then look at: doc ml...

14 years ago | 0

Answered
??? Undefined function or method 'dsip' for input arguments of type 'double'.
Are you by any chance looking for |disp| rather than |dsip|? Also, I recommend avoiding using l (lower-case L) as a variable ...

14 years ago | 1

Solved


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

14 years ago

Solved


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

14 years ago

Answered
ERROR - Error using zajimava_uloha (line 7) Not enough input arguments. Why?
How are you calling |zajimava_uloha|? If you are just using the green "play" button, _n_ the lone input argument will be undefi...

14 years ago | 0

Answered
Multi-parameter function plot with GUIDE
_Everything seems to work, but I feel like this is a poor code. Is there a better way to do this? (say only plot the function on...

14 years ago | 0

Load more