Answered
How do I compute the area enclosed by contourm?
I do not have the Mapping Toolbox, so I have no experience with contourm. However looking at the documentation, it appears to b...

5 years ago | 0

| accepted

Answered
how can i put a horizental bar on a plot?
We do not have the plot of the signal, however drawing the horizontal lines between the starting green lines and the ending red ...

5 years ago | 0

| accepted

Answered
Saving workspace as EDF
I am not certain what you have already tried. Perhaps the edfwrite function in the Signal Processing Toolbox will do what you...

5 years ago | 0

Answered
Group_Test1 is empty
If ‘np’ is 0 (the cell array is empty), the loop is satisfied at the outset and never iterates. If ‘np’ is 1, the loop iterates...

5 years ago | 0

Answered
GA opimization for kinetic parameter estimation of ODEs system
See Is it possible to use Simulated Annealing or Genetic Algorithm for parameter estimation of a parametric System of ODEs? for ...

5 years ago | 0

| accepted

Answered
How to draw such plot
Try something like this — v = [1 1000 2000]; % Controls Step Offsets fcn = @(x,v...

5 years ago | 0

| accepted

Answered
Interpolate non-uniform signals
Try something like this, using the Signal Processing Toolbox resample function — LD = load('example_data.mat'); data = LD.dat...

5 years ago | 1

Answered
using area function - drawing below 0 of y axes
To do this with the area function, changing the basevalue could work, however it is likely easier to use patch — x = linspac...

5 years ago | 0

Answered
Ploting satellite's orbit
It is not possible to run the code because several constants and at least one function are missing. Try either: plot3(x,y,z...

5 years ago | 1

| accepted

Answered
read multiple points from matrix
Use the sub2ind function to create linear indices from the subscripts — A = rand(50,50); X = [1 2 5]; % As...

5 years ago | 0

| accepted

Answered
"asin" function is always solving between 0 and pi/2 of interval. Why?
Most likelly because of the arguments you give it. From the documentation: For real values of X in the interval [-1, 1], as...

5 years ago | 0

| accepted

Answered
How to solve an integral of a matrix?
Try this — % Input variables fsw = 1*10^6; %Frecuencia de conmutación T = 0.5*1/fsw; %Semiperiodo Tsamp ...

5 years ago | 0

| accepted

Answered
Reading time from the year numbers, day numer and hour number
I cannot find a way using the MATLAB date and time functions to convert these automatically. Try this — year_number=2019.24...

5 years ago | 0

| accepted

Answered
Plot Confidence Interval of 95%
The nlpredci funciton will work here, however in the presence of a constrained optimisation, no confidence limits may be reliabl...

5 years ago | 1

Answered
How can I compute the amplitude of a "experimental" sinusoïd ?
Two functions that could do what you want are the related islocalmax and islocalmin. Example — t = linspace(0, 1, 500); c ...

5 years ago | 0

| accepted

Answered
How do I write x(t/2) using handle operator @
Try something like this — x = @(t) (t/2); t = 42; y = x(t/2) See the documentation section on Anonymous Funcitons for detai...

5 years ago | 1

| accepted

Answered
Vectors must be the same length.
Use the gradient function instead of diff and define ‘t’ based on ‘y’ — % h=0.04; %step size % t=0.04:h:0.6; %time y=[0.1560...

5 years ago | 0

| accepted

Answered
Using is outlier with threshold
You have a typographical error. It should be 'percentiles', not 'percentile'. From the documentation: TF = isoutlier(A,'pe...

5 years ago | 0

| accepted

Answered
How to count the number of local extrema/peaks on 3D plot?
I cannot provide anything definitive without the data, however the islocalmax functionn (introduced in R2017b) could be the corr...

5 years ago | 0

Answered
How to find a y value given the x on a plot?
Use interpolation, specifically interp1 here. Without your data, an illustration would be something like this — x = linspac...

5 years ago | 0

| accepted

Answered
delelte certain string data from cell
The ismember function is usually reliable in these situations — C = {'abc';'def';'ghi';'ghi';'ghi';'jkl';'mno';'pqr'} TF = is...

5 years ago | 0

| accepted

Answered
How do I make bar graph spacing equal?
One approach — Y = [2021 2021 2021 2021 2021] ; M = [02 02 02 02 03] ; D = [09 17 22 24 02]; x = datetime(Y,M,D); y = [2...

5 years ago | 2

| accepted

Answered
Getting Infinte value for performing ifft
There is a infinite element in ‘s2’, and it was creating the NaN elements in the inverse result. Removing it and converting the...

5 years ago | 0

Answered
How to plot a graph like attached figure (in the form of steps).
Use the stairs function. Example — y = linspace(0,10*pi); x = sin(y)+1000; figure stairs(x, y) xline(1000, '--') xli...

5 years ago | 0

| accepted

Answered
How can I get Magnitude and Phase in this code?
That does not appear to be MATLAB syntax. Symbolically, this is straightforward — syms omega T real G(omega) = 1 - exp(-(1...

5 years ago | 0

Answered
Sum in function object
It is not possible to operate on funciton handles themselves. It is necessary to evaluate the functions — loss = @(W, x, y) l...

5 years ago | 1

| accepted

Answered
Running Prewritten MATLAB code
Open the Editor by typing: edit in the Command Window. Paste the code into an editor tab, save it by whatever name you want ...

5 years ago | 1

| accepted

Answered
Contour plot with 3 independent variables
It would help to have the matrix. Try something like this — figure contour(Vector_1, Vector_2, Matrix) .

5 years ago | 0

| accepted

Answered
string inputs and if else statement
‘... how i should write code after if statement so that if state =empty ...’ This line: if state1= isempty and state2 = ise...

5 years ago | 0

| accepted

Answered
displaying 2 graphs in singe run
‘... but evry time it replace the first graph ...’ It does not replace them. It creates a second figure and that figure is o...

5 years ago | 0

| accepted

Load more