Réponse apportée
Program code for convolution
u = [1 2 3 1]; v = [2 3]; conv(u, v) % filter(u, 1, v)

plus de 3 ans il y a | 0

Réponse apportée
plotting a surface on a cylinder top face
theta =0:0.01*pi:2*pi; r=0.8; x=r*cos(theta); y=r*sin(theta); z=zeros(size(x)); % simple patch for base p_base =patch(x,...

plus de 3 ans il y a | 0

Réponse apportée
How to remove cell data from specific column using dates as a reference?
T = readtable("https://www.mathworks.com/matlabcentral/answers/uploaded_files/1085695/flowrate_dates.xlsx", "Sheet", 3) idx = T...

plus de 3 ans il y a | 0

Réponse apportée
combine two cell into one string
t = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1085370/SummaryResult%20-%20Copy.xlsx'); t = t(1:...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Echo+noise signal
% generate a waveform f0 =100; fs=1000; pw = 0.1; pri = 1; npulses = 10; s = cos(2*pi*f0*(0:1/fs:pw))'; % it can be ...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
Spectogram Of I and Q data
x = xi + 1i*xq; spectrogram(x)

plus de 3 ans il y a | 0

Réponse apportée
Transfer Quarterly dates to Monthly
% Your data dtstr = ["31/3/1992" "30/6/1992" "30/9/1992" "31/12/1992"]; x = [1.2 1.3 1.4 1.5]...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
What is the training accuracy of this model?
If Labels is character array instead of string array, then numel(Labels) will give the number of characters instead of the numbe...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Get coordinates points inside a 3-D circle in MATLAB
normal=[-3.5556 -0.2222 1.0000]; center=[138 146 219]; radius=3; plotCircle3D(center,normal,radius); hold on point = p...

plus de 3 ans il y a | 0

Réponse apportée
How can I label multiple routes on a geoscatter plot?
fig = figure; %pos = fig.Position; %files = dir('cast*.gpx'); for i = 1:5 %length(files) %filename = files(i).name; ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
operation on single elements in MATLAB
x=-2:1:2; %coordinates x y=x.^2; %coordinates y z=[x;y] d = diff(z, 1, 2) % diff along 2nd dim d = vecnorm(d...

plus de 3 ans il y a | 1

Réponse apportée
specifying frequencies in pwelch not working
No problem for on-line matlab. data = randn(20000,1); %assume this is 1 row of my EEG data of interest analysisWinSize = 1000...

plus de 3 ans il y a | 0

Réponse apportée
Create duration array template
ti = duration('00:00:0.00','Format','hh:mm:ss.SSS'); tf = duration('02:00:0.00','Format','hh:mm:ss.SSS'); interval = millise...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Multiply values in array by *-1
a = randn(1, 106); a(14:20) a(16:18)=-a(16:18); a(14:20)

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to find sum of previous 5 numbers in a column..
x = [56 45 56 678 678 568 2 3 4 5]; y = filter(ones(5,1), 1, x) y1 = y(5:end)

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Graph function problem Incorrect values
What's wrong? x=[0:50]; y=-x.^3+3*x.^2+2*x-27; plot(x,y)

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to reduce running time of diagonal matrix multiplication with full matrix in Matlab?
n = 2000; d=500; B = randn(d, n); dv = randn(n, 1); D = diag(dv); % Normal tic A = B*D*B'; toc % Speed up 1 tic C = ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to make a number NaN when its both neighbours are NaN?
A = [NaN 2.35 NaN 2.358 1.68 1.98 2.88 NaN 2.68 NaN 2.70 NaN 2.20 NaN 3.03; NaN NaN 2.77 NaN 2.67 1.87 2.56 1.88 2.39 NaN...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
adding an if condition so the negative value would be set to zero
for i=1:length(t) DOD(i)=cumsum((T(i)*30)/(3600*14.6)); end DOD = max(DOD, 0)

plus de 3 ans il y a | 0

Réponse apportée
Circular bar graph in matlab
% Some data T.Country = string(('A':'Z')'); T.Population = randi([1000 10000], size(T.Country)); T = struct2table(T); n = he...

plus de 3 ans il y a | 1

Réponse apportée
Plot with break in curve
xy=[0.0000 -963.0477 0.0043 -961.9818 0.0085 -960.8602 0.0128 -959.6834 0.0171 -958.4515 0.0214 -957.16...

plus de 3 ans il y a | 0

Réponse apportée
removing the pixels with different size and unregular shape
A simple approach is to find the regions you want to deleted (assign 0). Four your question, rectangle regions are sufficient: ...

plus de 3 ans il y a | 1

Réponse apportée
How to plot like this graph?
% [1 2][3 4] % [6 7] h(1) = subplot(2, 4, [1 2]); % 4x2 grid, 1st subplot plot(randn(10, 1)); h(2) = subplot(2, 4, ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Error using mesh Z must be a matrix, not a scalar or vector. Error in untitled6 (line 5) mesh(W,Y,Z)
w = 200:50:450; y=120:30:240; [W,Y] = meshgrid(w,y); Z= 64.0189+1.4629*W-2.626*Y-0.0012*W.^2+0.0098*W.*Y+0.0082*Y.^2; whos ...

plus de 3 ans il y a | 0

Réponse apportée
How to read .XY file?
file='random_x.txt'; fid = fopen(file, 'rt'); i=1; s1 = ''; while ~feof(fid) s{i} = [s1 fgetl(fid)]; %...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
regexp function - get index of string with two conditions
str = {'strawberry/banana#(';'apple#,melon*cherry';'apple_banana_cherry'}; s = regexp(str, '^apple.*(cherry)$', 'match'); id...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
creating a rectangle plot
p = [0 2 2 3 3 5 5 0 0; 0 0 1 1 0 0 4 4 0]; plot(p(1,:), p(2,:))

plus de 3 ans il y a | 0

Réponse apportée
copying the contents of a vector onto a longer vector
a = [1 2 3 4]; b = a(mod(0:9, 4)+1)

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to design a FIR filter by the -3db bandwidth?
Generally speaking, you don't have to worry about -3dB attenuation at the cut-off. You just specify the pass-band and stop band...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
To generate a series with n numbers on and n numbers off
n = 8; xmax=100; x = (0:n-1)'+(n:n*2:xmax); x=x(:)

plus de 3 ans il y a | 0

Charger plus