Answered
extract sub matrix of sub matrix directly
You will have to use *reshape* if you take a sub-set a different way, e.g.: >> a = rand(3,3,3); >> b = a(1:2,1:2,1) ...

12 years ago | 2

Answered
Inserting Zeros in a Matrix
preZeros = 5; postZeros = 2; DataCol = rand(3,1); %if really column vector NewDataCol = zeros(length(DataCol)+preZeros...

12 years ago | 1

| accepted

Answered
Shrink a 1-D array (vector) by removing all the columns with a value of zero
SimpleArray(SimpleArray==0) = [];

12 years ago | 2

Answered
Open UIGETFILE on 2nd monitor
Here are some comments within *uigetputfile_helper.m* that suggest user defined locations are no longer supported in later relea...

12 years ago | 0

Answered
frequencies from fft2 matrix
Take a look at my post here: <http://www.mathworks.com/matlabcentral/answers/24965-fft2-function-in-matlab> The example I sho...

12 years ago | 0

Answered
Determining the second last row
If you mean you want to set "sch_cycle" to have nrows - 1, then no need to actually determine "nrows" beforehand (just use "end"...

12 years ago | 0

Question


Generate random numbers with specific properties
Is anyone aware of something within the Statistics Toolbox (or an FEX submission) that can generate a set of M random numbers wh...

12 years ago | 1 answer | 2

1

answer

Answered
How to calculate Amplitude and phase out of FFT transform of the signal ?
This reminds me of the same issure here: <http://www.mathworks.co.uk/matlabcentral/answers/25479-sdof-frf-fft-magnitude-discr...

12 years ago | 0

| accepted

Answered
fprintf filename error
Is Fieldnames a string? Do: ischar(Fieldnames) if you get a 1, then it is not a cellstr and therefore cannot use {}.

12 years ago | 0

Answered
Displaying output from .exe file to gui
I have a few GUIs that do that exactly. However, I would caution you against "continuously" checking the status of the executed ...

12 years ago | 0

Answered
Definition of Time
DateNumber = datenum([Y, M, D, H, MN, S]) So... X = datenum(data(:,1:6))-min(datenum(data(:,1:6))); % Normalized tim...

12 years ago | 1

| accepted

Answered
Help with plotting multiple line complete with legends.
Something like this... x = 1 : 50; y = rand(11,50); % 11 traces, 50 samples long h = zeros(11,1); % initialize handles fo...

12 years ago | 1

| accepted

Answered
plot a signal in the freq domain
If the code is setup exactly the way you say above, then there is only one element in "f" and one element in "X". You need to do...

12 years ago | 1

| accepted

Answered
Numerical solution
Unless I misunderstood something, I think all you need to do is change: BL = 0; to if n == 1 BL = 0; end ...

12 years ago | 0

| accepted

Question


Alternative to using "unix(sprintf('ls %s/*/*/*.out',pathname))" ?
I am using the following command to gather a list of files with the same extension (*.out) down a couple directories: [~,Li...

12 years ago | 3 answers | 0

3

answers

Answered
I want to implement this matrix
>> A = zeros(4,8); >> A(:,2:2:end) = 5*eye(4,4); >> A A = 0 5 0 0 0 0 0 0 0 ...

12 years ago | 1

| accepted

Answered
DFT
Here is another (inefficient) way of saying the same thing as Wayne by way of example: Fs = 100; % samples per second dt =...

12 years ago | 0

Answered
FFT convolution shifts resulting waveform
Yes... that can happen. If your frequency response is boosting low frequencies, then "strange" things like that can happen. Usin...

12 years ago | 0

Answered
BER of OFDM, how scale correct after IFFT?
I use the FFT for a much different problem. In my case, the time domain data are always real and the frequency domain data are a...

12 years ago | 0

Answered
FFT - am i doing anything wrong
Although the scaling performed on the result from FFT (in the example above, which is based on Matlab's FFT documentation) may b...

12 years ago | 0

Answered
Accept or Reject
Here is an example. I generate a random dataset, then I cycle through each subset of data and I enter an "A" for accepting the d...

12 years ago | 0

| accepted

Answered
Accept or Reject
Yes. Search for "ginput" in your help navigator. You can even set it up so that pressing the button associated with "R" rejects ...

12 years ago | 0

Answered
fft scalloping or window effect
Nooooo... The FFT should be scaled by the time increment (dt = 1/fs). You apply this correction to ALL the amplitudes in the fre...

12 years ago | 0

Answered
How can the ans be surpressed so that only the fprintf will show?
Not putting a semi-colon ( ; ) at the end of a line within your code or at the end of a function call from the command line is u...

12 years ago | 0

Answered
what is the use of the symbol '*' in the function named fullfile?
It means that any file whose name is something.jpg will be used. For example if: myFolder = '/home/yourfolder'; then ...

12 years ago | 0

Answered
How to write the loop to collect data every step I want
You basically want to collect a sample at every 0.1 increment in time(?). Setup a counter before your "for" loop and initiali...

12 years ago | 0

| accepted

Answered
please help me identufy this.. i write the program but i dont know what this program do.. this is the command.. and output..
You are defining an array that is 1 row x 9 columns with values ranging from -9 to 11. You then calculate the "size" of the arra...

12 years ago | 0

| accepted

Answered
error-index must be a positive integer or logical.
You need to ensure all of the indices are greater than 0. When you round things (using "floor") you must be encountering values ...

12 years ago | 0

Answered
Set the Yticklabel to different colors
This not only changes the color of the tick label, it also changes the color of the specified axis: set(h,'YTickLabel','Hat...

12 years ago | 1

Answered
Find the centroid of a polygon
Check out: <http://www.mathworks.com/matlabcentral/fileexchange/319-polygeom-m>

12 years ago | 0

| accepted

Load more