Answered
error using fzero in line 6
Try something like this — hw7 % Call Function function hw7 fun = @(e) hw7f...

5 years ago | 0

| accepted

Answered
Ho do I use symbolic expressions to define a new function?
See if this slight revision of the posted code does what you want: f = @(t) cos(t); % L = integral_a^b(sqrt(1+f'(t)^2)dt df ...

5 years ago | 0

| accepted

Answered
Find min and max values in a constant interval.
The findpeaks function works, however it needs help to detect correctly the maxima and minima. Try this — opts = detectImpo...

5 years ago | 1

| accepted

Answered
Multiple plots in a single graph
It is necessary to create them in a loop, storing them in a cell array. After that, a single call to the functions works — m ...

5 years ago | 0

| accepted

Answered
Hi , can someone help me in printing the following expressions using matlab.
See: The Not So Short Introduction to LaTeX2e for reference. .

5 years ago | 0

| accepted

Answered
Initial conditions problem ODE15S
I will copy and run that (again) if necessary. In the interim, see if actually calling the plot function works — figure pl...

5 years ago | 0

| accepted

Answered
I need to convert comma ',' to dot '.'
One option in detectImportOptions (introduced in R2016b and updated in later releases) in Parameters for Text Files Only allows ...

5 years ago | 0

Answered
Date stamp on plot
The only way I can devise to delete the date is to create new y-tick labels and use them instead — F = openfig('untitled.fig')...

5 years ago | 0

| accepted

Answered
Using trapz just for positive areas
I would just use interp1 to interpolate the data, then use trapz to integrate it. The resolution of ‘xi’ determines the precisi...

5 years ago | 1

| accepted

Answered
How do I edit this bar graph? Y-axis thickness and ticks
See if the YAxisLocation and other Axis Properties and Numeric Ruler properties will do what you want.

5 years ago | 0

| accepted

Answered
Plotting an amplitude spectrum of a .txt file
Try this — D1 = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/647750/spec.txt'); signal = D1; L...

5 years ago | 1

| accepted

Answered
Draw arc with specified angle difference
Try this — LD = load('Data.mat'); Data1 = LD.Data1; A1 = Data1(:,1); R1 = Data1(:,2); D1 = Data1(:,3); Data2 = LD.Data2...

5 years ago | 0

| accepted

Answered
Plotting sine wave for voltage with variation of frequency
I am not certain what the desired result is. If the frequencies and amplitudes are fixed with respect to time, try this — t...

5 years ago | 0

| accepted

Answered
3D matrix surface plot animation
Try this — M = rand(10,10,5); % Create Test Matrix figure for k = 1:size(M,3) surf(M(:,:...

5 years ago | 0

| accepted

Answered
How to stack histograms
See my Comment replying to your Comment.

5 years ago | 0

| accepted

Answered
Trimming data with for loop
I am not certain what you want to do. Try this — acq2.data = randi([0 5], 10, 5) % Create Matrix i...

5 years ago | 0

| accepted

Answered
How do i insert seconds in a timeseries data when the frequency of the data is inconsistent?
Try this — Input_data = ['9/5/2021 11:30:00' '9/5/2021 11:30:00' '9/5/2021 11:30:00' ...

5 years ago | 0

| accepted

Answered
4 unknown 4 equetions
syms a b c d eq1=a+b+c+d==-9.3; eq2=(b*a+2)+(2+d*c)+(c+d)*(b+a)==+7; eq3=(b+a)+(d+c)*(b*a+2)+(a+b)*(2+d*c)+(c+d)==-4.507;...

5 years ago | 0

| accepted

Answered
Mann-Kendall test
See if the File Exchange contributions Mann-Kendall Test or Cumulative Mann-Kendall trend test will do what you want.

5 years ago | 0

Answered
How do I plot points on a contour?
I am not certain what result you want. I plotted it with scatter3, however if the intent os to have lines connecting the poin...

5 years ago | 0

| accepted

Answered
Filter function in MATLAB
The instability is generally not a problem with second-order-section realisation of IIR filters. The filtfilt function can oc...

5 years ago | 0

Answered
frequently used function for table variable
I am not certain what ‘T’ looks like. Something like this would work — T = table(randi([-40 40],5,1),'VariableNames',{'OldV...

5 years ago | 0

| accepted

Answered
How to select a specific column in matrices?
Concatenate them, then select the second column of the concatenated matrix — A = randi(9,4) B = randi(9,4) C = randi(9,4) D...

5 years ago | 1

| accepted

Answered
how to edit the axes tick labels?
Some of that can be done by setting the xlim property, the rest by decreasing the width of the axes ysiung the 'Position' proper...

5 years ago | 1

| accepted

Answered
How do I solve two ode (dct/dt and dR/dt) simultaneously with ODE45 and optimize two parameters using global optimization ?
See for one example: Parameter Estimation for a System of Differential Equations and How to properly model a kinetic reaction ...

5 years ago | 0

Answered
Filling the empty array
The code does not assign ‘crave’, ‘dcrave’ or ‘rest’ to anything. What do you want the code to do with those values? In ...

5 years ago | 0

| accepted

Answered
How to retrend data, after detrending it?
There are three different ddetrend funcitons. The one you want is: detrend however it does not return the function it used to d...

5 years ago | 0

Answered
Genetic algorithm options in MATLAB R2013
I do not have access to the R2013x documentation, since it is no longer available online. Are you certain those options are f...

5 years ago | 0

Answered
I can't put the degrees symbol on my chart.
See TickLabelFormat in NumericRuler Properties for a specific example.

5 years ago | 0

Answered
intersection of plane and surface
Use fsurf (or fmesh) and then use the view function to rotate it for best results — pos1 = [1721.983459 6743...

5 years ago | 0

Load more