Answered
Associating a uicontextmenu with uitoolbar object?
I do not believe so. If you: docsearch uicontextmenu properties parent and click on parent in the first result, you'll see ...

14 years ago | 0

Answered
Regarding the returned vector of dendrogram function
h1, h2 are handles which means you can use them to automagically or manually change properties of the plot. For example: z...

14 years ago | 0

| accepted

Answered
Align two arrays by time column
What do you mean 'align'? Is the data identical and so you want the |union| of them? Do you want a |mean| over locations of tw...

14 years ago | 0

Answered
Change the name of array in each iteration
*Don't Do It!* <ttp://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F FAQ:4.6> More: ...

14 years ago | 1

| accepted

Answered
Structural Arrays
I would just unpack the struct into matrices and do the math on the matrices. Repack them into a struct at the end if necessary...

14 years ago | 0

Answered
Help Writting a program
Don't think about using if elseif. Think about what the goal is - take a whiteboard/chalkboard/scrap paper and write out how it...

14 years ago | 0

Answered
"FOR" loop
Loop sure seems like overkill x = primes(100); x1p1 = x(1:end-1).*x(2:end);

14 years ago | 2

Answered
Number of values between constraints
No reason to loop: n = sum(x>=25&x<=71)

14 years ago | 0

| accepted

Answered
strings, while loop help
you can use |lower| and |upper| to force strings to your choice of capitalization. doc lower doc upper

14 years ago | 0

Answered
replace elements of a vector
A=[1 0 2 2 8 0 0 0 3 5 7]; B = A; %copy idx = logical(A); %locations to keep Anr = A(idx); %locations to keep idr = cumsum(...

14 years ago | 0

| accepted

Answered
Replace a value with matrix n x m
Maybe: data1 = ones(2); data2 = magic(2); D = [data1;data2]; D2 = reshape(flipdim(reshape(D',size(data1,1),size(data1,2),[]),...

14 years ago | 0

Answered
Quick question about "surf" or "surfc"
size(x1) size(y1) size(z) Will show that not all three matrix sizes are the same. Remember |meshgrid| swaps the inputs u...

14 years ago | 0

| accepted

Answered
String and display help
Use |ismember| to determine if the letter 'is a member' of the word. %Sample word, disguised word and letter guess word = 'si...

14 years ago | 0

Answered
Plot A Matrix
maybe one of these? doc mesh doc surf doc contour

14 years ago | 0

Answered
making 3D graph by limiting colors, define colors based on the values of z
%Your data, I made some assumptions about its shape x=(-.9:.1:.9)'; y=(.05:.05:.4); z=[66.4447 67.4929 68.6639 69.9560 71...

14 years ago | 0

| accepted

Answered
matrix manipulation
B = reshape(A',165,91); %pull from rows or B = reshape(A,165,91); %pull from columns Depending on how you want to p...

14 years ago | 1

| accepted

Answered
How do omit values in Matlab when taking R values?
So something like: x = 1:10; y = 3*(x)+7+rand(1,10)*2; %y = linear function of x plus noise x([3 7]) = -9999; corrcoef(x...

14 years ago | 0

Answered
Binarize a 3D image
Nothing really, if you're just thresholding. If you're using a more powerful binarization technique (threshold on something coo...

14 years ago | 0

Answered
2D slices' multiplication from 4D matrix
Without looking through what you've done, the goal seems pretty straight forward and loops should be able to handle it well (and...

14 years ago | 0

Answered
finding the index of a row with a maximum value
[junk, index] = max(Z(:,1));

14 years ago | 1

| accepted

Answered
Ran script given to me. Error message: Function definitions are not permitted in this context.
You're trying to define the function simpvec at the command line (at least that's what it looks like). This isn't allowed. The...

14 years ago | 0

Answered
How to transform Polar to cartesian
Perhaps |pol2cart|? doc pol2cart

14 years ago | 0

Answered
packet sniffing?
Yes, that should be doable. Use a |timer| function to periodically read in the data and analyze it. When the results meet what...

14 years ago | 0

Answered
normalized cross-correlation for analytic signals
You could perhaps normalize |xcorr2| by dividing by the product of the standard deviations. I'd recommend against trying to mod...

14 years ago | 0

Answered
How to avoid NaN when summing up vectors?
You could use |isnan| to find the nans and delete them or interpolate over them.

14 years ago | 0

| accepted

Answered
Gradients
You could use |triscatteredinterp| to interpolate onto a regular grid and then calculate the gradients with MATLAB's builtin |gr...

14 years ago | 0

Answered
Connect 4 Game
A few thoughts: * You know how to make white circles, so it should be fairly straight forward to make black/red ones. * The ...

14 years ago | 0

Answered
Resetting a pop-up menu in a GUI
set(handles.frame_size_2,'Value',n) where _n_ is the index to the line you want. And a good tip for remembering, |set| has...

14 years ago | 0

| accepted

Answered
How to get an ouput of a function in a try block ?
Add a |try| block to MyFunction! Well that's the easiest way and it's pretty safe. You could also use |assignin| if you really...

14 years ago | 0

| accepted

Answered
Why are my matrices changing size in a for loop?
You're referencing _t,x,y_ as indices in each loop iteration. As they grow (as the for-loop progresses) the data will change si...

14 years ago | 0

| accepted

Load more