Réponse apportée
Running example "Create Site Viewer" does not work in Matlab R2023b
Apparently, in the interest of reducing the increasing storage demands of the more recent MATLAB releases, MathWorks has stopped...

presque 3 ans il y a | 0

Réponse apportée
Can you answer why am I getting this error. What should Ido? The error says 'Unrecognised variable z'.
The first if block condition is not being satisfied, so ‘z’ is not defined. The reason is easy to see, since any absolute va...

presque 3 ans il y a | 0

Réponse apportée
How do I find the specific X-coordinates where y is equal to a specific value?
We do not have your data, however what you want to do is straightforward. Try this — freq = linspace(0, 10); y = mag2db(no...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
How can I just change the color of the bottom x-axis of a figure?
If you just want to change the axis colour, try something like this — Ax1 = axes; Ax2 = axes; Ax2.XAxisLocation = 'top'; Ax...

presque 3 ans il y a | 0

Réponse apportée
Revolve a Plot around y axis to generate a 3D plot
The easiest way to do this is to start with the sphere function and then scale it. Try this — theta =linspace(-pi/2,pi/2,10...

presque 3 ans il y a | 0

Réponse apportée
How to only change the sign without altering the font?
When I copy the sign from Windows Character Map and then explore it, your approach seems to work — figure plot([-10:-1]); % ...

presque 3 ans il y a | 0

Réponse apportée
How to find phase and frequency spectrum of signal?
A one-sided fft — t = -2:0.01:2; x = zeros(size(t)); x(t >= -2 & t < -1) = -1; x(t >= 0 & t <= 2) = -1; figure plot(t, ...

presque 3 ans il y a | 0

Réponse apportée
Daily and monthly moving averages
Use a timetable rather than a dataset. Then use the retime function.

presque 3 ans il y a | 0

Réponse apportée
Keep getting ERROR: Array indices must be positive integers or logical values for X(t)
Create ‘X’ as an anonymous function: X = @(t,C,Wd,Phase_Angle) (C.*exp(1).^-del.*Wn.*t).*cos ((Wd.*t)-Phase_Angle) % equation ...

presque 3 ans il y a | 0

Réponse apportée
In the case of a previously filtered signal, what methods can be employed to identify its filter characteristics?
If you have the original signal as well (before filtering), you can approximate the filter transfer function by taking the Fouri...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Finding the slope after drawing a trend/linear fit
Alternatively — files = dir('*.xlsx'); T1 = readtable(files.name) VN = T1.Properties.VariableNames; T = T1.T; x = T1.x; ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How can I align deterministic signals?
Probably the easiest way to do this (with these signals) is simply to threshold the beginning of each to get the index, then use...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
solve by the matrix method
Solving it symbolically — syms x1 x2 x3 x4 Eqns = [x1+2*x2-x3+x4==28 2*x1+4*x2-3*x3+x4==55 -4*x1+8*x2-12...

presque 3 ans il y a | 0

Réponse apportée
if loop for checking package weights and to calculate shipping costs
Try this — for package = [1 25 50 75 110] package % Package Weight In Loop (D...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
How can I display axis ticks when using fill syntax?
The easiest way is to bring the ticks to the top layer — x = linspace(0, 1).'; y = x; figure fill([x; flip(x)], [zeros(si...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Calculate median values of slices of array associated with histogram bins
I would use another accumarray call: binmedians = accumarray(idx+1, (1:numel(idx)).', [], @(x)median(array2(x))) Creating d...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How can I add a horizontal dashed line with a text description above it to a specific coordinate?
Perhaps this — t = linspace(0, 5); k = 0.75; y = 5*(1-exp(-k*t)); yval = 3; tval = interp1(y, t, yval); figure plot(...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
remove DC component of real time signal
The D-C component is the mean of the signal, so for a recorded signal, simply subtract the mean. Otherwise, since the D-C off...

presque 3 ans il y a | 0

Réponse apportée
Error: using fmincon and integral: Failure in initial objective function evaluation. FMINCON cannot continue
The ‘rhog’ variable must be defined in your workspace prior to using it as a function argument in ‘q’. EDIT — (14 Nov 202...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Factor P(x) with a degree of 4
One way to find out — syms x P = 5*x^4+3*x^3-6*x^2+x-4 x = vpa(solve(P)) x_real = x(imag(x)==0) x = vpa(root(P)) x_rea...

presque 3 ans il y a | 0

Réponse apportée
How to Plot Inverse Laplace with Heaviside?
Use the fplot function — clc syms s t Q = 10/(s*(s^2+100*s+1600))-10*exp(-3*s)/(s*(s^2+100*s+1600)); pretty(Q) q = ila...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Given an audio file, how can I construct a histogram of all bipolar pulses?
The findpeaks function can easily detect negative peaks. Simply negate the original signal to get them — t = linspace(0, 50...

presque 3 ans il y a | 2

| A accepté

Réponse apportée
how to calculate integral for combination of columns
One approach — T1 = readtable('ET1.xlsx', 'VariableNamingRule','preserve') [G,ID1,ID2,ID3,ID4] = findgroups(T1(:,1), T1(:,2...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to plot a surface with lat, lon and depth?
You will need to create a matrix from your data vectors. (It would help to have the actual data.) Assuming they are similar ...

presque 3 ans il y a | 0

Réponse apportée
Add Text Tile to Tiled Layout
One approach — x = 0:99; y = randn(3,100); figure tiledlayout(2,2) for k = 1:3 nexttile plot(x, y(k,:)) g...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How can I use histfit function?
Your data are frequency data (probably the result of performing a histogram on an original data set), not actual histogram data....

presque 3 ans il y a | 0

Réponse apportée
How to interpret the frequencies on a symmteric FFT plot.
You need to use the fftshift function to put the zero frequency (D-C or constant offset) value in the centre. Then, depending o...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to find the coordinates of contours when they go out of bounds and form multiple contours?
Here is my approach to this — load('contours.mat') pk = -32; [c2] = contourf(x2,y2,z35b, [pk pk] ,'ShowText','on',FaceAlpha...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to combine columns from large dataset to datetime with correct vector or doublestring?
Use curly brackets {} instead of parentheses when referring to numbered table variables — Date=datetime(dataTable{:,3:5})+hour...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How can I selectively multiplying the negative values with (-1) in an excel file?
Multiplying the negative values of column 2 by -1 will of course create them as positive values for all the entries. Use the ...

presque 3 ans il y a | 1

Charger plus