Answered
FFT of tidal data - problems identifying Mf component in MATLAB
The apparent fortnightly frequency is in fact a beat pattern - there is little energy at this frequency and the low-frequency no...

mer än 9 år ago | 4

| accepted

Answered
How to declare a function having bounds ?
I would go for a vectorised function: function x = clipZeroOne(x) x(x < 0) = 0; x(x > 1) = -1; end Test example...

mer än 9 år ago | 1

Answered
Question about imshow syntax
It's not possible to be sure what you want to do. However, trying to display a single pixel mag(1,1) doesn't usually make sense....

mer än 9 år ago | 0

Answered
how to extract features such as mean ,standard deviation,pixel orientation from segmented binary image
If you have the Image Processing Toolbox, look at *regionprops*.

mer än 9 år ago | 0

Answered
using attribute 'size' in validateattributes
I'm pretty sure validateattributes can't do what you want. If in fact A is required to be a column vector, you can use v...

mer än 9 år ago | 0

| accepted

Answered
i and j as Variable Names vs Imaginary Unit: What Advice to Give on MATLAB Answers?
I'm pretty much with Guillaume on this. I think there's a bigger issue. I feel that one of the things beginners get wrong is ...

mer än 9 år ago | 1

Answered
Detecting nonzero matrix elements in a rectangle
Say your edge array is E and opposite corners of a rectangle are at integer coordinates (x0,y0) and (x1,y1), with the former nea...

mer än 9 år ago | 0

| accepted

Answered
How can I detect gaps in a time series matrix and insert NaN's
I think this will do what you want: % test data data = [2015 01 20 01 10 1 2 3 4 5; ... 2015 01 20 01 20 ...

mer än 9 år ago | 5

Answered
How can I find the max and min amongst a set of grouping variables?
% test data data = [1 23; 1 29; 1 43; 2 38; 2 22; 2 100]; % compute minima and maxima mins = accumarray(data(:,1), ...

mer än 9 år ago | 4

Answered
I am using matlab 2013 version,does matlab works in radians or degrees and can i change from degrees to radians (or) radians to degrees in the settings?
To work in radians, use sin, cos, asin, acos etc. To work in degrees, use sind, cosd, asind, acosd etc. To convert from de...

mer än 9 år ago | 4

Answered
Error using imshow function
Almost certainly, every element of *SWIR_ACEimgNorm* is NaN (Not a Number). It's not possible to say how this has come about, bu...

mer än 9 år ago | 1

| accepted

Answered
How do split columns of dates in the format 'dd mm yyyy hh:mm:ss' to get just hh:mm?
I assume from the formats that your variable is a cell vector of strings, and that you want the result to also be a cell vector ...

mer än 9 år ago | 0

Answered
Create rolling-window matrix from vector
If the function is to accept a vector as input, as in the question: function output = createRollingWindow(vector, n) % C...

mer än 9 år ago | 6

| accepted

Answered
Rotating polar coordinates 180 degrees
If you want to ensure that all angles are in the range -180 to 180, you can do this: theta_true = mod(theta_refl, 360) - 1...

mer än 9 år ago | 0

Answered
Distance measurement using edge detection
Have you tried sub-pixel edge position estimation? If not, it would be interesting to see if it improves agreement. There's a su...

mer än 9 år ago | 0

| accepted

Answered
How can I retrieve variables from a nested function and use them on the parent function?
*Edit*: The answer below addressed the question of how to get results from nested functions, but doesn't adequately take into ac...

mer än 9 år ago | 0

| accepted

Answered
Extracting image coordinates from binary image
Normally, one needs to write [y, x] = find(bw); % y before x (array ordering) because the row indices are returned be...

mer än 9 år ago | 1

| accepted

Answered
Passing individual varargin arguments from one function to another
You need statsOut=regionprops(varargin{:}); which passes the contents of varargin as a comma-separated list.

mer än 9 år ago | 4

Answered
How to read a resized image?
You do not need to read *A*. It is already in memory. You can just do C = A; if you want to assign it to a new variable....

mer än 9 år ago | 0

Answered
How to apply a zero mean scaling in another set ?
I'm not sure I understand the question, because the answer seems so simple, but assuming that *input* is a vector, so *x_mean* a...

mer än 9 år ago | 0

Answered
How to import sequence of images from any folder?
Try I = imread(fullfile(pathname, fileNames{1}));

mer än 9 år ago | 0

| accepted

Answered
Undefined function 'fftshow' for input arguments of type 'double'.
You probably don't have fftshow.m on your MATLAB path. This m-file is not part of MATLAB or its toolboxes, but needs to be obtai...

mer än 9 år ago | 2

| accepted

Answered
Global and local statistics
A global statistic is one which describes the whole image - e.g. the mean grey level of all the pixels of the image. A local ...

mer än 9 år ago | 0

| accepted

Answered
Code executes slower after declaring variables with their respective types instead of double type
I'm sure that someone can offer a much more detailed and accurate story, but basically the machine is designed to be efficient w...

mer än 9 år ago | 1

| accepted

Answered
How to execute java program in MATLAB?
In o = Hello; *Hello* is the name of a variable, as it would be in Java also. (It could also be the name of a function i...

mer än 9 år ago | 0

Answered
How to create a matrix by inserting a vector into another matrix?
D = A; D(:,1) = B; or D = [B A(:, 2:end)];

mer än 9 år ago | 0

| accepted

Answered
Image recognition and tracking by cross correlation
You don't say what exactly you have tried, or what goes wrong in each case. There is code to do tracking by cross-correlation...

mer än 9 år ago | 1

Answered
Puzzler for a Monday
[~, idx] = ismember(B, A); C = circshift(A, [0 -idx]);

mer än 9 år ago | 0

Answered
how to apply a filter on image?
The hot spot is positioned relative to the filter bounds, not relative to the image bounds. To apply a filter, use *conv2* or *f...

mer än 9 år ago | 0

Answered
I have a variable which is <1X1000>.. how can i convert it to <1000x1> ?
See the documentation for transpose - give the command doc transpose or help transpose

mer än 9 år ago | 1

| accepted

Load more