Answered
Normalizing a histogram
Hi John, if you type "help hist", you'll find information about specifying the bar centers. This implicitly controls the width o...

14 years ago | 0

| accepted

Answered
Creating a histogram
That is correct. When you say "nothing happens", do you mean that the line of code executes, but no figure is produced? If so, t...

14 years ago | 0

| accepted

Answered
Plotting a user defined functions variables
Hi, Welcome to MATLAB. You should not name a function the same name as a function already in MATLAB,or on your path. To test ...

14 years ago | 0

Answered
PROBLEM IN DESIGNING A LOW PASS FILTER
Because Fp is the passband frequency and Fst is the stopband frequency. You have set your passband frequency to 0. You can...

14 years ago | 0

| accepted

Answered
HOW TO DESIGN A BANDPASS FILTER
You need a lowpass filter. You can use fdesign.lowpass. There are many possible specification strings. You have not stated all y...

14 years ago | 1

| accepted

Answered
Simple correlation Question
xcorr() crosscorr() Be careful with the word "frequency", there is a frequency domain correlation called coherence, but wh...

14 years ago | 0

| accepted

Answered
output plot
See the help for bar3 bar3(peaks(5))

14 years ago | 0

| accepted

Answered
n lowest values of a series
You can use sort() with the 'ascend' option. % find smallest 5 values n = 5; x = randn(100,1); y = sor...

14 years ago | 0

Answered
fft function
I think the OP is really thinking of the 'symmetric' flag in ifft(), not in fft(). The purpose of that flag is that often p...

14 years ago | 1

Answered
area under the graph
You can use fill() to color in the area under the graph of a line, and you can use a numerical integration method like quad() to...

14 years ago | 0

| accepted

Answered
FFT Kernel
Hi The 2D DFT computes the DFT (as defined by the equation in the fft documentation) on the columns of a, and then it computes t...

14 years ago | 0

Answered
Substitution
Just Steps(end) = LastStep; You are doing: Steps(Steps(7)) but Steps(7) is 1, so your code is saying "Assign ...

14 years ago | 0

| accepted

Answered
Sequence within a sequence
Another way (you need Signal Processing Toolbox) x = 1:4; y = upsample(x,4); h = ones(4,1); y = filter(h,1,y);...

14 years ago | 1

| accepted

Answered
remove equal items without loop
[~,inx,iny] = intersect(x,y); x(inx) = []; y(iny) = [];

14 years ago | 3

| accepted

Answered
??? Undefined function or variable 'x'
Hi Richard, save your function function g = somefn(t,x) g = zeros(size(x)); g(1) = y; end in some folder o...

14 years ago | 1

| accepted

Answered
xtick string with plot yy
You can do something like the following, but you have a large number of ticks here... so time = (0:23)'; n = numel...

14 years ago | 0

Answered
wavelet compression
Aravind, I'm not sure what you mean by "i used one dimensional signal so i cant use the option 'lvd'". This is not true. In m...

14 years ago | 0

Answered
polyfitn
Hi Laura, polyfitn.m is not a MathWorks' function. Did you mean polyfit.m? If so, yes that is available in R2010b,

14 years ago | 0

Answered
To measure time for sudden change in waveform
For this, you will want to use either the continuous wavelet transform (cwt or cwtft), or a nondecimated wavelet transform (ndwt...

14 years ago | 0

Answered
compresion ratio
You can use wcompress() and supply the optional 'comprat' parameter as an input argument. That is a valid input argument for ...

14 years ago | 0

| accepted

Answered
how do I print number to 1dp - or 0 dp if an integer?
You can use rem() rem(1.5,1) % gives 0.5 while rem(3,1) % gives 0 testval = 3.5; if (rem(testval,1)~...

14 years ago | 0

| accepted

Answered
Help using randn and pskmod
You want to generate your data using randi() like this: M = 4; msg1 = randi([0, 3],1024,1); qpsk_modulated_data1 =...

14 years ago | 0

| accepted

Answered
using quadl to find area between 2 curves
Q = quadl(@(x)sin(x)-abs(sin(2*x)/2),0,pi);

14 years ago | 0

| accepted

Answered
format y axis on a graph
x = linspace(0,2*pi); y1 = sin(x); y2 = abs(sin(2*x))/2; plot(x,y1,x,y2) set(gca,'ylim',[0 1]); set...

14 years ago | 0

| accepted

Answered
counting the values and variables
S = ['F' 'D' 'C' 'D' 'C';'C' 'C' 'F' 'D' 'F']; NumVars = length(unique(S));

14 years ago | 0

Answered
segmenting a speech signal and adding noise
If you have the Signal Processing Toolbox, you can use buffer(). Otherwise you can use reshape(), but buffer() allows you to eas...

14 years ago | 0

| accepted

Answered
resample
Hi R, Can you please tell us which version of MATLAB you are using. resample() is strictly mean to work on a sequence (a 1D vect...

14 years ago | 0

Answered
why it is showing Undefined function for input arguments of type 'uint8'
Did you save crop1.m in a folder that is on the MATLAB path? If you save crop1.m in c:\mfiles for example, then use addpath()...

14 years ago | 0

| accepted

Answered
figure
plot(randn(100,1)); hold on; h = plot(5,3.5,'k*'); %%% then reset(h)

14 years ago | 1

| accepted

Answered
How to use this code?
I think we're missing something here because match1 and match2 are supposed to be output arguments of the function you show, but...

14 years ago | 0

Load more