Answered
Smoothing a curve and conserving the first and the last value of the curve
Probably the only way to do that is to use the 'SamplePoints' name-value pair, and smooth all but the beginning and end points —...

4 días ago | 0

| accepted

Answered
10x10x15 matrix integration.
What are ‘X and Y axis’? I would use trapz and approach it as: AXY = A.*X.*Y.*A; Xint = trapz(AXY,1); ...

4 días ago | 0

Answered
How to plot two equal parts of axis y with unequal distances?
Set the tick locations (and displayed values if different) to specific values, and specify the tick format — x = zeros(1,5); ...

4 días ago | 0

Answered
not enough input arguments Urgent Help
The function declaration is: function [V] = Tank_Volume(R, h, L, H) and the function call is: V(i)=Tank_Volume(h(i),R,H); ...

4 días ago | 0

Answered
Help with global optimization problem
The Golbal Optimization Toolbox functions (as much as I like them) may not be appropriate for this. See if the rica function (t...

4 días ago | 0

Answered
how can use randn function with any matrix and negative or not integers numbers ??
I am not certain what the desired result is. One possibility — x = [ 1.542 -2.551 0.657 6.337 -0.678 3.758 8.421...

4 días ago | 0

Answered
nonlinear transformation between two sets of data points
The question is a bit ambiguous. If ‘fixed data’ is an input to the system, and ‘moving data’ is the output, the ssest function...

4 días ago | 1

Answered
Format t-stat in square brackets
With respect to the square brackets — x = randn(1,5); fprintf('[%8.4f]\n',x) ‘Also, how do I export the results in excel f...

5 días ago | 0

Answered
Magnitude of a matrix
See if the vecnorm funcion (introduced in R2017b) will do what you want — x=randi(100,1000,3); X=vecnorm(x,2,2) .

5 días ago | 0

| accepted

Answered
I want to find the corresponding blue and orange peak for the last oscillation.
Probably: [pks3,locs3]=findpeaks(signal3,tt2,'MinPeakDistance',2*pi); [pks4,locs4]=findpeaks(signal4,tt2,'MinPeakDistance',2*...

5 días ago | 0

Answered
Problem with cell array appending
Assigning is likely a more efficient approach than concatenation — A(:,:,1) = randn(1,5); B(:,:,1) = randn(1,5); C(:,:,1) = ...

5 días ago | 0

| accepted

Answered
Problem in Designing Linear Phase (Zero Phase) FIR Filter!
I do not see that you are doing anything wrong. However I made some changes that might improve things — lpf1 = designfilt('...

6 días ago | 1

| accepted

Answered
How to plot binary matrix as dots?
Try this — M = randi([0 1],25)>0; % Logical Matrix [r,c] = find(M); figure scatter...

6 días ago | 0

Answered
Time Series Partitioning of EMG data
Another approach, using the Signal Processing Toolbox buffer function — EMG = randn(4E+4,1) ...

6 días ago | 0

Answered
Error using lsqcurvefit (line 271) Function value and YDATA sizes are not equal.
The ‘Lp_Ps_Vb’ function is going to return ‘X’ that is going to be a (numel(t) x 2) matrix, so lsqcurvefit needs to have a match...

6 días ago | 0

Answered
Drawing a line to divide two parts of a curve
Try this — x = linspace(0, 20); y = (1-exp(-0.1*x)); xq = 10; yq = interp1(x,y,xq) figure plot(x, y) hold on plot([1 ...

6 días ago | 0

| accepted

Answered
find a value between two points
Use interp1 or fzero on a monotonically-increasing (or decreasing) curve such as that. Example — x = linspace(0, 50); y = ...

6 días ago | 0

| accepted

Answered
How do I fit the Gaussian distribution?
It gave a much better result when I ran it (R2021a) — LD = load('noise_filt.mat'); noise_filt = LD.noise_filt; figure hhf...

7 días ago | 0

| accepted

Answered
error in axis! help me
In this axis call: axis([0 bp*length(demodulated_data) -0.5 1.5]) there was originally an extra 0 just after the length call,...

7 días ago | 1

| accepted

Answered
Reconstruct signal using ISTFT after cutting off frequecies
Set the amplitude values at those frequencies to 0 rather than eliminating them from the vector. .

7 días ago | 0

| accepted

Answered
Reading multiple files in multiple loops
The separate ‘g’ loop is not necessary, since it can be created either using a counter or by calculating it. See if this does...

7 días ago | 0

| accepted

Answered
Error while integrating bessel functions
The problem is: Q = @(s) 2*(1 - (nu.^2))./(s.*E).*(1./(a(s) + b(s))); ↑ ↑ ← HER...

7 días ago | 0

| accepted

Answered
EEMD(ensemble EMD)
I am not absolutely certain what the problem is, because ‘does not work’ can mean just about anything. Note that according to...

7 días ago | 0

| accepted

Answered
conditioning array with complex number
This can probably be combined into fewer actual lines. I kept them separate to demonstrate the approach — A = complex(rand(...

7 días ago | 0

| accepted

Answered
frequency of letters in English message
One approach — plain= 'my name is samah samir and i am engineer'; ltrs = double(plain); ltrs = ltrs(ltrs>32)-double('a')+1; ...

7 días ago | 0

| accepted

Answered
Change "matrix" to a scalar
If you want to square the elements of ‘var’ use element-wise exponentiation (the ‘dot operator’). var=var*(1-(1/(i-1)))+i*(sum1...

7 días ago | 0

Answered
How to set scale range for a contour?
The x-axis goes from 1 to 2 because the contour plot is of a (117x2) matrix. That also explains the range of the y-axis. d...

8 días ago | 0

| accepted

Answered
How to make constant to 1 in power function in curve fitting toolbox
Use fminsearch rather than linearised polyfit for this. x1=[6.71214E-05 0.00112676 0.047319082 0.142706219 0.273947664 0.4...

8 días ago | 1

| accepted

Answered
How to use create table name variables in loop?
I am not certain that I understand what you want to do. Perhaps — randomdata = randn(33,10); NrCellArrays = fix(size(rando...

8 días ago | 0

| accepted

Answered
How to code and build a smaller array and 2D-plot charged particles to make clusters (as they are linked via indices) using charge, no of lone pair of electrons & bond order?
I am not certain what you want. I have no idea what ‘collecting the indices’ implies. Try this — T1 = readtable('https://w...

9 días ago | 0

Load more