Answered
How to calculate approximation error from 1x1 and 1x1001 symbolic signals
Much depends opn how you defined your triangularPulse. One option: syms x T(x) T(x) = triangularPulse(x); Tfcn = matla...

7 years ago | 0

Answered
Extract values from ODE45
‘How Do I extract the values of Ra and Rb and plot them ?’ You don’t ‘extract’ them. Just recalculate them from the integrat...

7 years ago | 2

| accepted

Answered
How to draw a electromagnetic wave and plot it in 3D
I’m not certain what you want. Try this: E = 2; H = 3; t = linspace(0, 2*pi); omega = 2; k = pi/2; x = ones(size(t))...

7 years ago | 1

| accepted

Answered
matrix of dimension 100,000 x 100,000 x 100,000
You do not need a technician. You need at least 8 petabytes ( bytes) of memory for your matrix alone (double precision). Goo...

7 years ago | 1

| accepted

Answered
Black axes for yyaxis (not default blue and orange)
Try this: figure yyaxis left plot((1:10), rand(1, 10), 'g') yyaxis right plot((5:15), sin((5:15)/5), 'r') ax = gca; ax.Y...

7 years ago | 33

| accepted

Answered
how to get 2 outputs of my function?
The reason is likely the way you are calling your ‘LR’ funciton. If you request both outputs, your function will deliver them...

7 years ago | 1

| accepted

Answered
How do I make a menu save the choice as a string instead of a value?
Address your ‘D’ cell array with the ‘day’ variable: % Create array for days of the week: D={'Monday','Wednesday','Friday'}; ...

7 years ago | 0

| accepted

Answered
Plotting function in two variables only for specified domain
Logical matrices can result in vector results that can be difficult to work with for surf, mesh, and similar plots that require ...

7 years ago | 1

| accepted

Answered
WHY DATE CANNOT TRANSFER FROM EXCEL TO MATLAB BY XLSREAD?
If you have R2013b or later, use the readtable (link) function. It should automatically convert the Excel dates to MATLAB dates...

7 years ago | 1

| accepted

Answered
2d truss analysis
You don’t have negative integers, however positive integers are integers greater than 0. Here: SN = MemberP(j,1); ...

7 years ago | 0

Answered
Error using ^ Incorrect dimensions for raising a matrix to a power when trying to simulate a steady state simulation of DFIG
I’m not certain what you want, or what your code does. One option is to address only the latest elements of the vectors (even...

7 years ago | 0

Answered
How do I plot a certain interval?
This will overplot the region (8,12) with a red dashed line: for N = 8; Mc = [-2:0.01:15]*N; Pi_c = 1+(2*N-1)*(3-2*M...

7 years ago | 0

| accepted

Answered
How do I adjust my histogram to show approx. 50 different categorized bins with very small data?
You need to subscript ‘t’ to save it as a vector. Try this: iter=10000; FS=40; for n=1:iter Sy=2.11*10^8+(60*rand(1)...

7 years ago | 0

| accepted

Answered
Using the 'Surf' command for variable 'x' values
It doesn’t work because ‘y’ is a vector. Try this: x= [1.158633 4.871195 7.667851 11.45038 22.11895 1.221922 3.77...

7 years ago | 0

| accepted

Answered
Adding standard error bars to grouped bar graph
You are in luck in not using categorical variables, because this approach will not work with them (although I’ve not had the opp...

7 years ago | 1

| accepted

Answered
Need to combine every other column of two row vectors of different sizes in MATLAB
One approach: A = [1 3 5 7 9 11 13 15 17]; B = [2 4 6 8 10 12]; C(1:2:numel(A)*2) = A; C(2:2:numel(B)*2) = B; C = C(1:mi...

7 years ago | 1

| accepted

Answered
How do I multiply a column in a matrix by a range of values?
I am not at all certain what result you want. Try these: spark_rng = linspace(-12, 30, numel(sfd(:,3))); ...

7 years ago | 0

Answered
How to order variables by their size?
Try this: [~,ix] = sort(cellfun(@sum, onsets)); Out = names(ix) producing: Out = 1×3 cell array {["C"]} {["...

7 years ago | 1

| accepted

Answered
how to extract pcg signal features from a dataset for machine learning
See Wavelet Time Scattering Classification of Phonocardiogram Data (link).

7 years ago | 0

| accepted

Answered
low pass filter to matrix
You can apply any filter to a matrix using the filtfilt (link) function to do the actual filtering. From the documentation: ...

7 years ago | 0

| accepted

Answered
How to locate last peak in data?
Use the findpeaks (link) function, most likely with the 'MinPeakHeight' name-value pair. Then use the second ‘locs’ output (an ...

7 years ago | 0

Answered
3D spectrum plot with massive data sets
The spectrogram (link) function will likely do what you want.

7 years ago | 1

Answered
Sample a continuous signal with Sampling frequency
‘Would I do this by only looking at the points of the signal that correspond to the sampling frequency I decide on?’ Yes. In...

7 years ago | 1

| accepted

Answered
Syntax Question struct array - Unexpected MATLAB operator.
Refer to general arguments in your function definition, not specific variables. So your function would be defined as: funct...

7 years ago | 1

| accepted

Answered
changing diagional values with different values
I am not certain what result you want. Try this: MX1 = randi(9, 4) D1 = diag(MX1); Xv = sum(MX1,2) - D1; MX1 = triu(MX1,...

7 years ago | 1

| accepted

Answered
Inserting Timestamp into a Matrix
I still have no idea what you want to do. However, if you want to concatenate the even rows to the odd rows and have ‘2019’ b...

7 years ago | 0

Answered
integrate 2D data
Use trapz (link) or cumtrapz (linked to in that page).

7 years ago | 2

Answered
Taking second derivative and solving it for when it equals 0
I am not certain what you are doing. Taking the derivative of data will significantly amplify any noise that might be present, ...

7 years ago | 0

| accepted

Answered
reassigning a value in a piecewise function
I am not exactly certain what you want to do. Try this: syms y(x) y(x) = piecewise(0<=x<25, 0,25<=x<=50, 0.5+x/50, 50<=x<=...

7 years ago | 0

Answered
How can i store values calculated in my loop
I am not certain what you are doing. One option is to create a second matrix (‘X2’ here), and store the results in it: X = [9...

7 years ago | 1

| accepted

Load more