Answered
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)...

4 years ago | 0

| accepted

Answered
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) ...

4 years ago | 0

| accepted

Answered
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...

4 years ago | 0

| accepted

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

4 years ago | 0

| accepted

Answered
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 ...

4 years ago | 0

| accepted

Answered
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,...

4 years ago | 1

Answered
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;...

4 years ago | 1

| accepted

Answered
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...

4 years ago | 0

Answered
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...

4 years ago | 0

| accepted

Answered
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 ...

4 years ago | 0

Answered
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...

4 years ago | 0

Answered
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 ...

4 years ago | 0

| accepted

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

4 years ago | 0

| accepted

Answered
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. ...

4 years ago | 2

| accepted

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

4 years ago | 1

| accepted

Answered
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 ...

4 years ago | 0

| accepted

Answered
Formatting exel import in readtable()
It would help to have the Excel file to experiment with. In its absence see the documentation on detectImportOptions and expe...

4 years ago | 1

| accepted

Answered
Application of Logical operators
Perhaps something like this — figure hold on for k = 1:4 patch([1 2 2 1]+2*(k-1), [1 1 4 4], 'b', 'FaceAlpha',0.5) ...

4 years ago | 0

| accepted

Answered
Does MATLAB have inverse tangent integral TI2(z)?
The polylog function exists in the Symbolic Math Toolbox. It supports symbolic and numeric (double) arguments.

4 years ago | 0

Answered
How do I apply a function to every resulting element of a buffer function?
‘How do I apply a function, e.g. hamming(256), to each column?’ Do an element-wise multiplication — v = randn(256,2) vh ...

4 years ago | 0

| accepted

Answered
How can I fix "Error in sym/subsref (line 898) R_tilde = builtin('subsref',L_tilde,Idx); ?
Perhaps — syms xQ xQ = sym('xQ',[1 3]) xQ2 = xQ(2) See the documentation on sym for details.

4 years ago | 0

Answered
Second order to first order system
One approach (that involves doing an interim Laplace transform on the differential equation) — omega = 2; zeta = sqrt(3)/4...

4 years ago | 0

Answered
Saving population individauls for each generation of GA Multiobjective optimisation.
I created a function for ga (not the multiobjective version) that will do that. See if the approach in How to save data from Ge...

4 years ago | 1

Answered
Sometimes my 2-D plots won't show up.
Normally, that sort of problem is caused by using matrix division (/) instead of element-wise array division (./) however the ‘x...

4 years ago | 0

| accepted

Answered
lsqcurvefit - initial condition
The problem with nonlinear parameter estimation is that the results can be highly dependent on the initial parameter estimates. ...

4 years ago | 0

| accepted

Answered
Want to create a time vector
I have no idea what you want to do, although the linspace function may be a more precise approach — t = -10:0.01:10-0.01 ...

4 years ago | 0

Answered
Why am I not getting the m array?
That clears up much. Plotting them is simply this — %% data X=[6,7,10,14,13,9]; Y=[12,9,7,8,10,14]; xi=10; yi=10; ...

4 years ago | 0

| accepted

Answered
[SOLVED] Semi-colon not supressing output
I do not see any missing semicolons in the file, so the most likely problem is that there is one missing when you call the funct...

4 years ago | 0

| accepted

Answered
How to Save Multiple Figures in Loop?
Perhaps this instead — saveas(gcf, sprintf('File%02d_6.tiff',i), '-dtiff'); Specifing the numeric field as '%02d' creates a t...

4 years ago | 0

| accepted

Answered
Sum, then filter, then re-separate data
It would help to have the sampling frequency. I am not certain what you want to filter, however for now I am assuming that is...

4 years ago | 0

| accepted

Load more