Solved


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

14 years ago

Answered
strange plotting issue
# Have you tried printing to something other than pdf? # Have you tried |<http://www.mathworks.com/matlabcentral/fileexchange/2...

14 years ago | 0

Answered
how to detect corner of image and find coordinate of corner - I need M-file code
How about: doc cornermetric as a place to start?

14 years ago | 0

Answered
Solve non-linear equation with 2 unknowns and lb/ub constraints
FMINIMAX solves a minimax objective; you have a regular maximum objective and thus should be using FMINCON with the negative out...

14 years ago | 0

| accepted

Solved


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

14 years ago

Answered
For an nx3 matrix, order the 3 entries in each row, then order rows from least to greatest, then check for repeated rows.
In R2012a or later, this will do it: X = [[1 3 2;1 3 2]; rand(10,3)]; [Y,~,idx] = unique(sortrows(sort(X,2,'ascend'),1:3),...

14 years ago | 0

Answered
How to keep aspect ratio fixed, when rotating 3D objects in GUI?
Set the axes' _<http://www.mathworks.com/help/releases/R2011b/techdoc/ref/axes_props.html DataAspectRatio>_ and _DataAspectRatio...

14 years ago | 0

Answered
Making determinant zero
How about the quick and shoddy numerical way? x = magic(4); fzero(@(y)det(x.*y),pi)

14 years ago | 1

Answered
Fit a curve of equation of form y = ax^b to data
Any of these are designed for this. * |lsqcurvefit| Optimization Toolbox * |nlinfit| Statistics Toolbox * |NonlinearModel| ...

14 years ago | 0

Answered
Help understanding the imbothat function.
edit imbothat will show you that your above |imsubtract(imclose))| suspicision is indeed correct. As for understanding it,...

14 years ago | 1

| accepted

Solved


Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

14 years ago

Answered
Graphing help please!
figure; peaks You're going to have to be a lot more specific if you want any useful responses.

14 years ago | 0

Answered
How to combine vectors of different length into matrix ?
I would just use a |for|-loop and some fun indexing: A =[ 1 2 3 4 5]; B = [3 4 5 0 0; 1 2 4 5 0; 4 5 0 0 0]; sz = siz...

14 years ago | 0

| accepted

Answered
"H must be the handle to a figure or figure descendent" when updating handles.
The error message is telling you that you ar etryin got save the handles structure to an object which is not a figure and that t...

14 years ago | 0

Solved


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

14 years ago

Answered
Non-negativity for unconstrained nonlinear multivariable function
You probably could, but it is not ideal. |fmincon()| will be your friend, though. *More per follow up* Here are two ways to ...

14 years ago | 0

Solved


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

14 years ago

Answered
renaming variable on workspace with string from cell of catalogue
You don't really want to do that! For the same reasons that you don't want to create <http://matlab.wikia.com/wiki/FAQ#How_can...

14 years ago | 1

| accepted

Answered
Find continuous elements in matrix
CC = bwconncomp(a); CC.PixelIdxList{:}

14 years ago | 0

Answered
recreate vector
One of many ways: a_c = [9 3 5]; a_x = [4 6 9]; B = zeros(1,a_x(end)); B([1 a_x(1:end-1)+1]) = 1; C = a_c(cumsum(B)...

14 years ago | 1

| accepted

Answered
how to set x axis into hours
Something along the lines of: set(gca,'xticklabel',num2cell(num2str((0:2:22)'),2)')

14 years ago | 0

Answered
How to read and show .img files continuously from the folder
Do you have the corresponding *.hdr files? IF so then these are likely Analyze 75 files and you can use <http://www.mathworks.c...

14 years ago | 0

| accepted

Answered
loop of powers
p = 1*10.^[-24:1:-20]

14 years ago | 0

Answered
Automated techniques to quantify surface area and assign coordinates to objects
If your module is not convex, then <http://en.wikipedia.org/wiki/How_Long_Is_the_Coast_of_Britain%3F_Statistical_Self-Similarity...

14 years ago | 0

Answered
Using GeneralizedLinearModel.stepwise
What version of MATLAB are you using? The statistical model classes were <http://www.mathworks.com/help/toolbox/stats/rn/bs8t...

14 years ago | 0

Answered
How to improve computing in matlab?
MATLAB is fine with loops. It's been fine with loops for a very long time but yet still carries that mantra that "loops are bad...

14 years ago | 5

| accepted

Answered
Combine arrays
Xcat = [x1 x2 x3]; do_stuff_with(Xcat)

14 years ago | 1

Answered
import data from the web?
You could always use |urlread| and then post process the string: str = urlread('http://geoid.colorado.edu/grace/data/data-3...

14 years ago | 0

Answered
Links to matlab documentation in "published" html pages
Use the direct URL to the online documentation, e.g: %% to be published %Hello a = pi; %% World % <http...

14 years ago | 1

Answered
How to make a FOR loop to be efficient
eps(pi) _ans = 4.4409e-16_ 1e-16 is going to be a hard target to hit... Why not use a realistic tolerance?

14 years ago | 0

Load more