답변 있음
Nested if statements done elsewise?
N = 5000; x = 2*rand(N,8) - 1; u = (x<0); v = (sum(u,2)==8);

8년 초과 전 | 1

| 수락됨

답변 있음
Using if and then statements
function r = findQuadraticRoots(a,b,c) if something is true do some stuff; else ...

8년 초과 전 | 0

답변 있음
Transfer function in Simulink
H(s) = Y(s) / U(s)

대략 9년 전 | 0

| 수락됨

답변 있음
How can I extract a single component from a Fourier decomposition of a 2D matrix and plot it as a 2D map?
Here's a start: [ M, N ] = size(PV); Fs_x = 1/dx; Fs_y = 1/dy; dF_x = Fs_x/M; dF_y = Fs_y/N; Fx = -F...

대략 9년 전 | 0

답변 있음
plot vector where negative data is circled
isNeg = (data < 0); plot(abs(data),pos) hold on plot(abs(data(isNeg)),pos(isNeg),'o') set(gca,'xscale','log');

대략 9년 전 | 0

| 수락됨

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

대략 9년 전 | 0

| 수락됨

답변 있음
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...

대략 9년 전 | 0

답변 있음
Create a nxn matrix with the same values
B = 3*ones(9);

대략 9년 전 | 4

| 수락됨

답변 있음
Plot transfer function of band pass filter
doc fvtool doc freqz

대략 9년 전 | 0

답변 있음
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...

대략 9년 전 | 0

답변 있음
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); ...

대략 9년 전 | 0

답변 있음
How do I plot Magnitude And Phase Response of a DT Signal
doc fft

대략 9년 전 | 0

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

대략 9년 전 | 1

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

대략 9년 전 | 0

답변 있음
Mex file still too slow
Please try: cfg.DynamicMemoryAllocation = 'off'; Also: cfg.IntegrityChecks = false; cfg.ResponsivenessChe...

대략 9년 전 | 3

답변 있음
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.

대략 9년 전 | 0

답변 있음
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);

대략 9년 전 | 0

| 수락됨

문제를 풀었습니다


Golden ratio
Calculate the golden ratio. Hint: phi^2 = phi + 1.

대략 9년 전

답변 있음
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)...

9년 초과 전 | 1

| 수락됨

답변 있음
Vectorizing interdependent nested 4-for loop
# Did you pre-allocate |Aineq| prior to the loop? # Did you pre-allocate |bineq| prior to the loop?

9년 초과 전 | 0

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

9년 초과 전 | 0

| 수락됨

답변 있음
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...

9년 초과 전 | 3

답변 있음
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 ...

9년 초과 전 | 1

| 수락됨

답변 있음
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;

9년 초과 전 | 0

| 수락됨

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

9년 초과 전 | 3

답변 있음
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:...

9년 초과 전 | 2

| 수락됨

답변 있음
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...

9년 초과 전 | 1

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

9년 초과 전 | 0

답변 있음
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 =...

9년 초과 전 | 0

| 수락됨

답변 있음
Generate Code with Structure with Different Size Matrices
doc coder.varsize

9년 초과 전 | 0

| 수락됨

더 보기