Answered
plotting a discrete signal that starts from -2
If you don't want just default x-axis values of 1 upto the length of the array you need to define the values and plot e.g. ...

10 years ago | 0

| accepted

Answered
Give name from string array
Make AHN2 into a struct with 'tiles' as its fields e.g. [AHN2.( tiles{i} ), R_AHN2] = geotiffread(fileAHN2_05m); That mi...

10 years ago | 0

| accepted

Answered
Undefined Function or variable Error
Is the file on your Matlab path? In order for Matlab to see it and run it it must be on your path.

10 years ago | 0

Answered
plot graph from text document
doc textscan %d is used to specify an integer being read in. You need to use %f to read a double or %f32 if you want to ...

10 years ago | 0

Answered
Convert 10-minute wind data into hourly wind data
Assuming you do not have any missing times you should just be able to trim off one value from your results to have a data set of...

10 years ago | 0

| accepted

Answered
Alternative to 'findpeaks'
http://www.mathworks.com/matlabcentral/fileexchange/?utf8=%E2%9C%93&term=find+peaks

10 years ago | 0

Answered
how can i plot the line in different colours
Just plot three different lines and give them each a colour rather than plotting them in a single instruction. You can also put...

10 years ago | 0

| accepted

Answered
Calculate phase from time-domain response
You should be able to just find the peaks of each and take the shifts between the two or use the hilbert transform to give compl...

10 years ago | 0

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

10 years ago

Answered
Convert fig into csv, txt or ascii
I've never used it myself but there is a doc csvwrite function that sounds like it does what you want with respect to wr...

10 years ago | 0

| accepted

Answered
Can anyone explain the absence of functions when testing
Not sure I understand the main part of your question, but you seem to have answered that. As for the other part, I have done ...

10 years ago | 0

Answered
Conversion from logical no longer works in MATLAB 2015a
You should use ishghandle(...) for graphics handle objects, but if hw is a graphics handle object then I'm not sure what...

10 years ago | 1

Answered
get mesh from surf function
If you mean the X, Y and Z meshes that define the surface then the XData, YData and ZData properties of the surface object conta...

10 years ago | 0

Answered
hi....radio button and process button problem
doc uibuttongroup gives an example of how to do this.

10 years ago | 0

| accepted

Answered
How to find the name of the file that is being edited?
doc mfilename will give you the name of the file currently executing. I'm not aware of any function that will give you t...

10 years ago | 0

Answered
How to reformat GUI for different devices
Using 'normalized' units generally helps to do this, but only if you do it for all components, panels and the main figure. This...

10 years ago | 0

| accepted

Answered
How to position a GUI centered on the desktop
Where to put it exactly depends whether you are using a GUIDE GUI or a programmatic one. I forgot the function exists so I po...

10 years ago | 0

| accepted

Answered
How to use pushbutton and popupmenu
You need handles.EEGDATOS1 = EEGDATOS1 guidata( hObject, handles ) at the end of your pushbutton callback and EE...

10 years ago | 0

| accepted

Answered
Issue with 'intersect' arrays function
You need to convert your times array to strings if you want to compare them. You can't compare a time with a string, whether wit...

10 years ago | 0

Answered
how to find the median of histogram?
Just sort all the image values and take the central one if you want the median value of an image. If you want the median valu...

10 years ago | 0

Answered
How to store values from a function used in a for loop?
sigma_one = .2; sl= .2:.01:.3; numValues = numel( sl ); OP_vector = zeros(1,numValues ); for n = 1:numV...

10 years ago | 0

Answered
Problem in using function handle?
npc is a fixed input to that function handle, it will be set at the time the function handle is created as a constant. If you w...

10 years ago | 0

| accepted

Answered
how to change the data type when read .xls file using xlsread() function
varXls = uint16( xlsread('filename') );

10 years ago | 0

Answered
Keep track of iterator in different pushbuttons
for iter = 1 : 5 uicontrol('style', 'pushbutton', 'position', [20 iter*30 50 20], 'string', 'Open...', 'callback', @(sr...

10 years ago | 1

| accepted

Answered
A general question of matrix to matrix
reshape( [a; b], [2 6] ) with obvious generalisations for different sizes of vector and assumptions on a and b having the s...

10 years ago | 0

| accepted

Answered
How to calculate the Pathlength of a function where -180 degrees is next to 180 degrees?
Is it not just: min( [len 360-len] ) where len is the result of your pathlength function?

10 years ago | 1

| accepted

Answered
Elegant way to obtain the values of multiple button selection?
You can create an array of radiobuttons at the start of UI as e.g. hRadioButtons = [ handles.rb1, handles.rb2,...handles.rb...

11 years ago | 1

| accepted

Answered
Express the sum of squares as a percentage of how well two signals match?
The two methods I have tended to use are: absDiff = abs( y1 - y2 ); absDiffEnergy = sum( absDiff.^2 ); y1Energy = sum...

11 years ago | 0

Answered
How to write vectors line by line in a txt file using fprintf delimited by a space?
fprintf(fid,'%.5f ',h0); should be enough. Note the space in the string.

11 years ago | 2

| accepted

Load more