Beantwortet
How can I create isolated waves from data I have?
The most robust way I am aware of to detect zero-crossings is: zci = find(diff(sign(y))) where ‘y’ is the signal youwant to a...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
How do I download the signal processing package into my MATLAB R2022a?
This has changed over time. In MATLAB, click on Add-Ons and then click on View My Products. That should offer you the opportun...

etwa 4 Jahre vor | 1

Beantwortet
How to convert YYYYDDMMhhmm into 5 columns of YYYY, DD, MM, hh, mm?
One approach — A = [202021031200; 202021031210]; As = string(A) ADT = datetime(As, 'InputFormat',"yyyyddMMHHmm") ADTM = [...

etwa 4 Jahre vor | 0

Beantwortet
How to create figure containing 4 plots with tiledlayout for different values of a parameter?
The essence of creating the tiledlayout here is: tiledlayout(2,2) for k = 1:numel(idx_JC_vec) nexttile idx_JC = idx...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
how to extend a straight line passing through two points until it meets the y axis of the Cartesian plane
It already meets the y-axis at the origin (0,0). If you want to extend it to , that is straightforward — slope = -53634 / -...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
ARRANGE DATA IN MATLAB
It depends on the result you want — v = 1:10 vm1 = repmat(v, 10, 1) vm2 = v(:) * v Other possibilities also exist. .

etwa 4 Jahre vor | 0

Beantwortet
How to interpolate and plot discrete measurement data corresponding to spacial coordinates?
It is definitely possible to interpolate those values to a finer set of coordinates and to use scatter3 to display them with re...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
How do I ask for a string input?
It is likely easier to save it to a cell array — FileName{i} = input("File Name: ","s"); That worked when I tried it offline...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
How do you change the color on a class in a legend?
Try something like this — figure; hold on hp{1} = plot(Xred(1,:),Xred(2,:),'r.'); hp{2} = plot(Xblue(1,:),Xblue(2,:),'b.'); ...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
x and y- line until point
Illustrating the approach — x = linspace(0, 5); % Create Data y = sin(2*pi*x/2.5)...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to use num2str inside text with latex interpreter?
I prefer to use sprintf for this. (If you use any escape characters, you need to use double backslants. See the documentation ...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Error when trying to plot a polynomial with data.
Use the polyval function.

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to fit my data with a custom equation meant to come out as a parabola?
The ‘constant’ (parameter vector) is giving back three values because you are giving it three values to begin with: [min(avera...

etwa 4 Jahre vor | 0

Beantwortet
Get Lapalce transform from filter specifications
Not that I am aware of, however it would be relatively straightforward to create it — Rp = 1; Rs = 50; [b,a] = ellip(5, Rp,...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to properly set ticks, numbers and the their decimal places on colorbar?
Try something like this — [X,Y,Z] = peaks(50); figure surf(X, Y, Z) grid on colormap(turbo) hcb = colorbar; % get(hcb)...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to evaluate numeric expression in a string, which contains "12u" (for 12e-6) and "0.1m" (for 0.1e-3) formated numbers (standing for micro and milli)?
Here is my regexprep attempt at ‘seval’ — str = 'max(1u,2m)'; out = seval(str) str = 'max(1.5u,2.01m)'; out = seval(str) ...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
System Identification Toolbox with Multiple Input Variables and one Output Variable
If by ‘parameter’ you mean inputs and outputs respectively, yes. See the iddata section on Input Arguments, then define the s...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Error tolerance in matlab
Singularities occur when the denominator of a fraction approaches zero, or for certrain transcendental functions (e.g. exp, tan)...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Time Domain Data or Correct Data Structure for System Identification Toolbox
The signals appear to be regularly sampled, so that should work. The iddata function is an appropriate starting point for time ...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
help create a positive sin wave
Perhaps — syms t positive_sine = sin(2*pi*t) + 1 figure fplot(positive_sine, [0 5]) grid ylim([-1 3]) hold on yline(0,...

etwa 4 Jahre vor | 1

Beantwortet
System of Nonlinear Equations exceeds function evaluation limit
You need to tell fsolve that the options sturcture exists — g = 9.81; Az_mech = 0.028*g; Az_dyn = 0.5*g; Ax_mech = 0.092*g;...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
Plot will not graph lines
The ‘d’ values are all scalars. Perhaps plooting the ‘y’ values as a function of their associated ‘x’ values — g = 9.81; v...

etwa 4 Jahre vor | 0

Beantwortet
fitlm and exponential model help
The "exponential" option for modelspec does not appear to exist. The fitnlm function is likely more appropriate. That is mor...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Graph not showing plots
The loop is not necessary. However if you choose to use it, the variables must be subscripted in order to save them to vectors ...

etwa 4 Jahre vor | 0

Beantwortet
vector partial derivative of a two variable function
Use the gradient function — x=[0:0.1:1]; y=[0:0.1:1].'; z=x.^2+y.^2; [Dx,Dy] = gradient(z) figure surf(x,y,z) hold o...

etwa 4 Jahre vor | 0

Beantwortet
Date/Time Processing and Formatting Issues
The 'yyyy' needs to be 'uuuu' (ISO year) to avoid problems with the conversion — C = {'2022:246:10:00:02.593994140',4.44E+01 ...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
MATLAB is not displaying my numbers as what they should be.
Use the format function to display the data as you want them.

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to find inflection point of a curve
First, use the sgolayfilt function to eliminiate as much of the noise as possible, since taking the derivative will amplify it. ...

etwa 4 Jahre vor | 2

| akzeptiert

Beantwortet
Creating a log probability plot for particle size distribution
See the Statistics and Machine Learning Toolbox probplot function.

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
Print different name than that of the index in figure inside for loop
Probably the easiest way would be to specify a vector for the names and index into it — v = [10 100:100:900]; for i = 1 : 10 ...

etwa 4 Jahre vor | 0

| akzeptiert

Mehr laden