已回答
Partitioning data out of .txt files
websave("scan.txt", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1150740/archer_fieldnotes_scan.txt") %type ...

4 years 前 | 0

| 已接受

已回答
How to make a matrix from several column vector
a = rand(1,1); b = rand(10,1); c = rand(100,1); % you are not able to combine them into a matrix as you sepcified since the...

4 years 前 | 0

已回答
How to obtain mean of columns in multiple cells?
% Generate data for i=1:5 a{i} = randn(3439, 72); end % find means s = zeros(size(a{1})); for i=1:5 s = s + a{i...

4 years 前 | 0

| 已接受

已回答
How to interpolate gridded data for contourf?
doc fillmissing

4 years 前 | 0

已回答
Implementation of fractional delay filter from scratch in matlab
If you are looking for source code of fractional delay, check out this and its accompanying codes: T. I. Laakso, V. Valimaki, M...

4 years 前 | 0

已回答
Solve matrix equations using loop
The equations you have: You want to solve it for , and . You need to rearrage the equations: Now you solve this new syst...

4 years 前 | 0

已回答
How to find FWHM from this?
Your data has no half power points so you cannot find fwhm. load(websave("fwhmdata.mat", "https://www.mathworks.com/matlabcentr...

4 years 前 | 0

已回答
How to accurately compute the phase lag between two time series with same sampling frequency.
s=load(websave("Data_timeseries.csv", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1148175/Data_timeseries.cs...

4 years 前 | 1

| 已接受

已回答
Graphing a two variable limit
x= -0.5:.01:0.5; y = 0.5:.01:1.5; [xx, yy] = meshgrid(x, y); zz = acos(xx./yy)./(1+xx.*yy); %zz = nan(size(xx)); % idx = ab...

4 years 前 | 1

| 已接受

已回答
How to fix error "Array indices must be positive integers or logical values."
function xc = mybisect(f, a, b, tol) format longg; a_vals = zeros(a, length(tol)); b_vals = zeros(b, length(tol)); c_vals = ...

4 years 前 | 1

| 已接受

已回答
strings in conditional statments
l = input('Do you want to plot: ', "s"); % s for string if l == "yes" % string comparison instead of cha...

4 years 前 | 1

| 已接受

已回答
Is my matlab code for the sinc signal below correct.
%************ Variable declaration****************** t = -20:0.1:20; p = -10:1:10; signal = zeros(1,length(t)); %for spped al...

4 years 前 | 0

已回答
How to plot the convolution integral of two functions
Use symbolic math: syms x y h tau %x = 0:0.5:10; y = exp(-x); % use -1 and -2 to ensure convolution exist h = exp(-2...

4 years 前 | 1

已回答
Error: Edge vector must be monotonically non-decreasin with isosurface
Nx = 32; Ny = 32; Nz = 32; Lx = 2*pi; Ly = 2*pi; Lz = 2*pi; x = (0:Nx-1)/Nx*2*pi; % x coordinate in Four...

4 years 前 | 0

| 已接受

已回答
How to plot envelope of a signal
load t.mat load signal.mat whos plot(t, signal); hold on [yupper,ylower] = envelope(signal,1000, 'peak'); plot(t, yupper, ...

4 years 前 | 0

| 已接受

已回答
Cross Correlation lag issue
P2 = randn(10, 1); P3 = [zeros(5, 1); P2]; % P3 is P2 delayed by 5 [xc2,lags2] = xcorr(P2,P3); plot(lags2, xc2) [rho2,imax...

4 years 前 | 0

已回答
Adding XYZ axis in RGB colors in the corner of a plot
plot(rand(10,1)) annotation('arrow', [0.8, 0.7], [0.8, 0.75], 'Color', 'r') annotation('textbox', [0.68, 0.70 0.05 0.05], 'Str...

4 years 前 | 0

| 已接受

已回答
How to label a structure name in a loop
low.t1 = 2; low.t2 = 3; for i=1:2 data = low.("t"+i) end

4 years 前 | 0

已回答
Reorder vector without for loop
A = randn(583200, 10); B =reshape(A, 540, [], 10); B = permute(B, [2 1 3]); B = reshape(B, 583200, 10); whos % To verif...

4 years 前 | 0

已回答
using subplot in bar , how to adjust bar width
x1 = [1 2 3]; y1 = [1 2 3 ]; x2 = [1 2 3 4 5]; y2 = [1 2 3 4 5]; % Make xlim same so that the bar width is the same h1= s...

4 years 前 | 0

已回答
Rotate Basis Vectors Programmatically
V1 = orth(randn(6)) % your original orthonormal basis % Then you can apply any other orthonormal basis to it % For e...

4 years 前 | 1

已回答
Sorting Values my Integer and Decimal Values
p = [8.1 8.2]; if floor(p(1)) == floor(p(2)) disp("A pair.") end f = [2.1 , 3.1 , 4.1, 5.1, 6.1]; if all(abs(diff(mo...

4 years 前 | 1

| 已接受

已回答
Correlate Signals with different time points
You can resample the data into sime sampling time: doc resample doc retime doc interp1 After both signals are sampled in the...

4 years 前 | 0

已回答
How to remove the AWGN noise from data?
Uo=[20 30 40 50]; % signal U=awgn(Uo,30) % add noise to signal % Uo=U-awgn(30); % if you don't know t...

4 years 前 | 0

已回答
How to trasform from cell to matrix and transpose from horizontal to vertical at the same time?
Data.my_cell{1} = randn(1, 11); Data.my_cell{2} = randn(1, 11); Data.my_cell{3} = randn(1, 11); Data.my_cell my_matrix = cel...

4 years 前 | 1

| 已接受

已回答
How do I zoom in on a certain section of a magnitude bode plot
num = [1]; den = [1 0.04946 3.00316 0.0989847 3.00322 0.0494631 1.00006]; g=tf(num, den) bode(g) grid on ax = findobj(gcf, ...

4 years 前 | 0

已回答
Obtaining Sine Wave From Square Wave
% generate a square wave with no fixed period f = 0.125; fs=1; s = 0.3+sin(2*pi*f*(0:40)); % a sine wave with offset x =2* (...

4 years 前 | 0

| 已接受

已回答
why do I get this error while using qammod? "Expected input number 1, X, to be an array with all of the values < 4."
A few bugs in program. The major one is generating input signa which should bel: tx_bits=randi([0 M-1], [N_data_symbol,1]); N...

4 years 前 | 1

| 已接受

已回答
Using trapz function to provide answers using loop
% The way to use trapz x= 1:20; % x y = randn(20, 1); % y ytrapz = trapz(x, y) % integr...

4 years 前 | 0

| 已接受

已回答
Storing sparse matrices in cell or struct without converting them to full
The sparse array in cell is still sparse array as shown below, Can you show the problem you have encountered? a = sparse(eye(1...

4 years 前 | 0

| 已接受

加载更多