已回答
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 前 | 2

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

12 years 前 | 1

| 已接受

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

12 years 前 | 2

已回答
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 前 | 0

已回答
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 前 | 0

已回答
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 前 | 0

提问


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 前 | 1 个回答 | 2

1

个回答

已回答
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 前 | 0

| 已接受

已回答
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 前 | 0

已回答
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 前 | 0

已回答
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 前 | 1

| 已接受

已回答
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 前 | 1

| 已接受

已回答
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 前 | 1

| 已接受

已回答
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 前 | 0

| 已接受

提问


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 前 | 3 个回答 | 0

3

个回答

已回答
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 前 | 1

| 已接受

已回答
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 前 | 0

已回答
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...

13 years 前 | 0

已回答
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...

13 years 前 | 0

已回答
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...

13 years 前 | 0

已回答
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...

13 years 前 | 0

| 已接受

已回答
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 ...

13 years 前 | 0

已回答
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...

13 years 前 | 0

已回答
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...

13 years 前 | 0

已回答
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 ...

13 years 前 | 0

已回答
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...

13 years 前 | 0

| 已接受

已回答
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...

13 years 前 | 0

| 已接受

已回答
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 ...

13 years 前 | 0

已回答
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...

13 years 前 | 1

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

13 years 前 | 0

| 已接受

加载更多