Beantwortet
how can i add noise in particular place of the sine wave?
noise = [ zeros(N,1) ; rand(M,1) ]; distorted = source + noise;

etwa 9 Jahre vor | 0

| akzeptiert

Beantwortet
Passing a function value to another function
You could write a script that calls each of the functions one or more times in the desired sequence, passing the output of one f...

etwa 9 Jahre vor | 0

Beantwortet
Create a nxn matrix with the same values
B = 3*ones(9);

etwa 9 Jahre vor | 4

| akzeptiert

Beantwortet
Plot transfer function of band pass filter
doc fvtool doc freqz

etwa 9 Jahre vor | 0

Beantwortet
My code is just about there, but there is something not right...I can't figure it out. Help?!
The very first line inside the |for| loop is not correct: v(k)= a.*t; First of all, you need to define a time increment...

etwa 9 Jahre vor | 0

Beantwortet
Am I doing this right?
m = 1428.8; a_gas = 3; dt = 0.5; t = (0:dt:50)'; N = length(t); x = nan(N,1); v = nan(N,1); ...

etwa 9 Jahre vor | 0

Beantwortet
How do I plot Magnitude And Phase Response of a DT Signal
doc fft

etwa 9 Jahre vor | 0

Beantwortet
How do I show a subplot next to the other one?
figure; subplot(1,2,1); plot(...); subplot(1,2,2); plot(...);

etwa 9 Jahre vor | 1

Beantwortet
How create a calculator function ?
Here is a start: function y = calculator(a,b,t) % Insert your header comments here % % % insert you...

etwa 9 Jahre vor | 0

Beantwortet
Mex file still too slow
Please try: cfg.DynamicMemoryAllocation = 'off'; Also: cfg.IntegrityChecks = false; cfg.ResponsivenessChe...

etwa 9 Jahre vor | 3

Beantwortet
Do I convert the units?
Yes. I think Kp will remain unchanged, but Ki and Kd will both need to scale to account for the change in the time units.

etwa 9 Jahre vor | 0

Beantwortet
How do I get my script to produce a 2-D array?
n = 30; X = zeros(n+1,2); X(:,1) = 0:n; X(:,2) = ... disp(X);

etwa 9 Jahre vor | 0

| akzeptiert

Beantwortet
Plotting Step Responses with For Loops
figure; axes; hold on; for tau = 35:5:60 sys = tf([75],[tau 1]); [y,t] = step(sys); plot(t,25+y)...

etwa 9 Jahre vor | 1

| akzeptiert

Beantwortet
Vectorizing interdependent nested 4-for loop
# Did you pre-allocate |Aineq| prior to the loop? # Did you pre-allocate |bineq| prior to the loop?

mehr als 9 Jahre vor | 0

Beantwortet
Power Spectral Density two approaches
Please replace the following line of code: periodogram(y, rectwin(length(y)), [], fs, 'oneside', 'power'); with: ...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Plotting a Complex exponential - G(e^jw)
N = 1024; dw = 2*pi/N; w = -pi:dw:pi-dw; s = exp(j*w); G = (s-a)./((s-b).*(s-c)); figure; plot(w,abs(G...

mehr als 9 Jahre vor | 3

Beantwortet
How to complete the fourier Analysis using Matlab ?
doc fft doc fftshift doc abs doc angle doc plot doc stem doc xlabel doc ylabel doc grid doc xlim ...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
fft of a 2 simple cos functions
Replace the following line: f=(0:nfft/2-1)*Fs/nfft/2; with: f=(0:nfft/2-1)*Fs/nfft;

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Mex speed slower on linux than Windows
They are not the same MEX function - different compilers, different instruction set architectures, different assemblers, differe...

mehr als 9 Jahre vor | 3

Beantwortet
How to force MATLAB Coder to not combine two functions into one?
Insert the following line of code in any MATLAB a function that you want to have as a separate function in the generated C code:...

mehr als 9 Jahre vor | 2

| akzeptiert

Beantwortet
Read some images from one folder contain on many images
for k = [ 1 5 13 20 21 30 33 40 48 ] filename = sprintf('P%i.png',k); X = imread(filename); Y...

mehr als 9 Jahre vor | 1

Beantwortet
error with 8psk modulation
Instead of data = randi([0 1],4000,1); please try data = randi([0 1],3000,1);

mehr als 9 Jahre vor | 0

Beantwortet
Superimposing two figures on the top of each other
m = 1800 / ( 3 - -3) ; dx = 1800 / 2 ; u = m*x + dx ; n = 1000 / ( 1.6 - -1.6 ) ; dy = 1000 / 2 ; v =...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Generate Code with Structure with Different Size Matrices
doc coder.varsize

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
How to Generate Rayleigh Fading
Please see: <http://www.mathworks.com/help/releases/R2014b/comm/ref/rayleighchan.html Rayleigh Fading Channel>

mehr als 9 Jahre vor | 2

Beantwortet
spectrogram function: phase and magnitude
The |spectrogram| function returns complex numbers, which include both magnitude and phase information. [S,F,T] = spectr...

mehr als 9 Jahre vor | 2

| akzeptiert

Beantwortet
Is there any build in function to perform polynomials multiplication?
u = [ x1 ; y1 ]; v = [ x2 ; y2 ]; z = conv(u,v);

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
which are the default properties of plot for the MATLAB 2014b?
The easiest way to find out is simply to ask MATLAB: fig = figure; ax = axes; lin = plot(1:10,rand(1,10)); g...

mehr als 9 Jahre vor | 0

Beantwortet
i want to filter a frequeny
doc iirnotch

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Storing a vector as a row of a matrix?
N = 12; x = rand(1,N); y = rand(1,N); z = rand(1,N); A = [ x ; y ; z ] ;

mehr als 9 Jahre vor | 0

| akzeptiert

Mehr laden