Answered
Estmated time required for my following program
If you are using R2016a (or maybe R2015b, I can't remember when it was introduced) there is now the very useful pause feature wh...

9 years ago | 0

| accepted

Answered
How do I find standard deviations within bimodal data?
fit2.Sigma will give you the covariance array which should just be variances if you have 1d data. The standard deviation c...

9 years ago | 0

| accepted

Answered
I want to sort the positive integer values from a given values of real, rational, negative values in an array.
tol = 1e-5; a = a( a > 0 & abs( floor(a) - a ) < tol ); should work I think. Certainly it works on your example vector...

9 years ago | 1

Answered
How can I change the intensities of a certain pixel in an image along with 3*3 surrounding neighbor pixels?
[x, y] = find( a == 0 ); a( x-1:x+1, y-1:y+1 ) = 4; Obviously you would need to deal with when you are on the border and...

9 years ago | 1

Answered
How do I address "Subscript indices must either be real positive integers or logicals" in an if/else statement nested in a for loop?
0 is not a real positive integer. You must start your indexing from 1 and end at the size of sequence1 for place = 1:numel...

9 years ago | 1

Answered
Function index is a string, why?
Why are you naming a variable passed to your function the same as a function? The string you pass in as the variable 'Fun' is h...

9 years ago | 1

Answered
Dumb mistakes we make with MATLAB.
Since I happened across this old thread, one that continually catches me out since I work a lot with plotting of complex signals...

9 years ago | 1

Answered
Check if GUI is open
Keep hold of the handle of the figure when you launch it. Then just do a if ishghandle( otherFigureHandle ) or i...

9 years ago | 1

| accepted

Answered
How can I plot with imagesc and set two y axes?
If you have two images I assume you want two distinct axes so something like doc subplot would work better, or just crea...

9 years ago | 0

| accepted

Answered
How do I write the following functions on Matlab x(t) = 2tcos(pi*t) , y(t) = 2sin(pi*t)
t = linspace( 0, 2*pi, 100 ); x = 2 * t .* cos( pi * t ); y = 2 * sin( pi * t );

9 years ago | 1

Answered
How can i sum the intensities of red, green and blue for each pixel in an array
intensitiesSum = sum( rgbImage, 3 );

9 years ago | 1

Answered
How can I name variables in a for loop?
Use a cell array: S{i} = data(:,5); T{i} = data(:,7); You really don't want all those individually named variables. ...

9 years ago | 3

Answered
Variable overflow doesn't work
Something like this would work, though I am sure there are neater ways. Obviously you would need to overload all the other oper...

9 years ago | 0

Answered
Find minimum of $n$ first entries, with $1\leq n\leq numel(X)$.
Y = cummin( X ); will do the job. There are a few in that family of functions that do cumulative analysis on a vector.

9 years ago | 0

Answered
How do I set the SelectionChangedFcn for the tabs group I have created?
I was posting this in response to your answer which you deleted while I was typing!, but hopefully it still makes sense by itsel...

9 years ago | 2

Answered
Possible MatLab versions incompatibility
I assume this array gets interpreted somewhere later on so you should probably just add { handles.main_axes } to the arr...

9 years ago | 0

Answered
Repeating row in matrix for 365 times ?
repmat( a, [365, 1] )

9 years ago | 1

| accepted

Answered
why is 'wcoherence' not being recognised as a function?
I assume you don't have the Wavelet Toolbox?

9 years ago | 0

Answered
How to merge two arries with different elements?
t1 = [0,1,2,3,4,6,7,8,11,15,23]; r1 = rand( 1, 11 ); t2 = [2,3,4,5,7,9,10,12,13,14,16,18,20,22]; r2 = rand( 1, 14 ) *...

9 years ago | 0

| accepted

Answered
How to remove tools from deployed GUI figure windows?
<</matlabcentral/answers/uploaded_files/59322/ToolbarDelete.png>>

9 years ago | 0

| accepted

Answered
How to delete some portion of signal?
idx = find( TS >= 0.25 ); plot( TS( idx ), S( idx ) )

9 years ago | 0

| accepted

Answered
how to create diamond of 101x101 in matlab
If you have the image processing toolbox then: se = strel( 'diamond', 50 ); diamond = se.Neighborhood; will give you ...

9 years ago | 2

| accepted

Answered
How do i write the If-statement with characters?
You should use strcmp( navm, 'Mathias' ) for comparing strings. Equality test (==) would only work if the two strings...

9 years ago | 1

Answered
Image averaging code needed
From the help page for imadd (doc imadd): 'If X and Y are integer arrays, elements in the output that exceed the range of the...

9 years ago | 0

Answered
Request the user to input their seven digit KU ID that
All you need is a prompt that asks for that specific structure. Then they can type anything. You do the validation of what the...

9 years ago | 0

Answered
How to find the value of a matrix in a specific position?
sz = size( B ); idx = sub2ind( sz, A(:,1), A(:,2) ); res = B( idx );

9 years ago | 1

| accepted

Answered
How can i create random rectangles (automatically)?
Using doc rectangle would be simpler than defining a patch like that I would think. Then if you want random positions i...

9 years ago | 1

Answered
How can I solve "Could not find version 7.15 of the MCR"
http://uk.mathworks.com/products/compiler/mcr/ gives details on the Matlab Compiler Runtime. If you need 7.15 then that must...

9 years ago | 0

Answered
Property listener with OOP
I use dependent properties for this, e.g. properties value end properties( Dependent ) un...

9 years ago | 2

| accepted

Answered
Using structfun with nested structures
You should be able to wrap it in an arrayfun. This is likely slower than using a for loop, as arrayfun tends to be, but if you ...

9 years ago | 0

Load more