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

quasi 10 anni fa | 0

| accettato

Risposto
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...

quasi 10 anni fa | 0

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

quasi 10 anni fa | 4

| accettato

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

quasi 10 anni fa | 0

Risposto
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...

quasi 10 anni fa | 0

Risposto
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); ...

quasi 10 anni fa | 0

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

quasi 10 anni fa | 0

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

quasi 10 anni fa | 1

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

quasi 10 anni fa | 0

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

quasi 10 anni fa | 3

Risposto
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.

quasi 10 anni fa | 0

Risposto
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);

quasi 10 anni fa | 0

| accettato

Risposto
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)...

quasi 10 anni fa | 1

| accettato

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

quasi 10 anni fa | 0

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

quasi 10 anni fa | 0

| accettato

Risposto
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...

quasi 10 anni fa | 3

Risposto
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 ...

quasi 10 anni fa | 1

| accettato

Risposto
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;

quasi 10 anni fa | 0

| accettato

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

quasi 10 anni fa | 3

Risposto
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:...

quasi 10 anni fa | 2

| accettato

Risposto
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...

quasi 10 anni fa | 1

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

quasi 10 anni fa | 0

Risposto
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 =...

quasi 10 anni fa | 0

| accettato

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

quasi 10 anni fa | 0

| accettato

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

circa 10 anni fa | 2

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

circa 10 anni fa | 2

| accettato

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

circa 10 anni fa | 0

| accettato

Risposto
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...

circa 10 anni fa | 0

Risposto
i want to filter a frequeny
doc iirnotch

circa 10 anni fa | 0

| accettato

Risposto
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 ] ;

circa 10 anni fa | 0

| accettato

Carica altro