Answered
How to find intersection between a straight line and a curve?
Another approach — x = linspace(-15, 15, 150); y = sinc(0.5*x); l = 0.6; [~,idx] = max(y); xq(1) = interp1(y(1:idx),x(1:...

4 years ago | 2

| accepted

Answered
Please give me some head start to find similar pattern on signal.
Two options that I would experiment with are findsignal and findchangepts to segment the signal. These are both in the Signal...

4 years ago | 1

Answered
How to Change Initial Number of Random Points in Genetic Algorithm?
Create an options structure using optimoptions, and define 'InitialPopulationMatrix' to the correct dimensions for your problem....

4 years ago | 0

| accepted

Answered
Optimization terminated: average change in the fitness value less than options.FunctionTolerance.
That is not an error. That is simply a message that explains the reason ga finished its optimisation. Did it produce an ac...

4 years ago | 1

| accepted

Answered
How to take a data form text file to put it in another file?
Try this — fidi = fopen('File.1.node','rt'); F1c = textscan(fidi, '%f%f%f%f', 'HeaderLines',1, 'CollectOutput',1); fclose(fi...

4 years ago | 0

| accepted

Answered
System Identification - input data file?
If the ‘u’ and ‘y’ data are in the time domain, use the iddata function to create a data object that the estimation functions (s...

4 years ago | 0

Answered
how i can find the stride time for each gait cycles
Use findpeaks or islocalmax to find and isolate the peaks that describe the stride. Use findpeaks on the negative of the sign...

4 years ago | 0

Answered
How to choice the right frequency analysis
I do not know what the experimental setup was, so I cannot suggest any particular cause as being the source of the spikes. They...

4 years ago | 0

| accepted

Answered
Error in using lsim function
The code does not define ‘u’ anywhere except in the ‘springmass’ function, and since functions have their own workspaces, and it...

4 years ago | 0

| accepted

Answered
Is it possible to create a tuner with matlab?
Try this: Notes = {'C4','C#4/Db4','D4','D#4/Eb4','E4','F4','F#4/Gb4','G4','G#4/Ab4','A4','A#4/Bb4','B4'}; Scale = [261.63; 27...

4 years ago | 0

| accepted

Answered
How do I plot a integration result?
The ‘Ps’ integration produceds onlly one value, the value of the integral between the limits of integration. To get a vector f...

4 years ago | 1

| accepted

Answered
How do I juxtapose the two plots so that the circles indicating the peak amplitude is in contrast with the plot?
Try this — plot(t(locs),pks,'o'); The reason is that with this findpeaks call: [pks,locs] = findpeaks(Ca) The ‘locs’ outpu...

4 years ago | 0

| accepted

Answered
I am having trouble doing integration for the following code.
The warning is likely the result of the second term, that becomes Inf at higher values. Fs= 2.16*10^-5*pi; % Geometri...

4 years ago | 0

| accepted

Answered
Error in loglog plot
I have no idea what the original problem was, however breaking it out into two different plot statements (that I originally did ...

4 years ago | 0

| accepted

Answered
what is the meaning of set(gca,'Fontsize',16)
The gca function returns the handle to the current axes object. The set call sets the 'FontSize' of the associated text objects...

4 years ago | 0

Answered
How to label the points on x axis in hours.
Use this approach to convert the strings to datetime arrays: old = {'2020-08-03T20:40:00.111Z'; '2020-08-03T21:40:01.123Z'}; ...

4 years ago | 1

Answered
Getting an error when trying to create a 92x1 matrix.
The problem is in the sixth row: 238.8;239.0;241.8;241.8;239.6,... The comma at the end should be a semicolon. The comma cre...

4 years ago | 0

Answered
segment function issues by using matlab
The error is that ‘s’ was not defined anywhere in the ‘up’ function, so MATLAB has nothing to assign to it in order to return it...

4 years ago | 0

Answered
finding the start and end points of a unimodal peak
The findpeaks function might not be the best option here. Experiment with ischange and findchangepts (Signal Processing Toolb...

4 years ago | 0

| accepted

Answered
how to read a .mat file into table
The struct2table function could be helpful.

4 years ago | 0

| accepted

Answered
Why does the output of audioread() gives samples less than shown in audioinfo() ?
This is interesting! The online Run feature computer uses Linux, and gives this result: ZF = 'https://www.mathworks.com/mat...

4 years ago | 1

| accepted

Answered
Arrange and Plot array values over time
One approach — M = rand(24,24,5); % Example Matrix figure hold on for k = 1:size(M,3) surf(...

4 years ago | 0

Answered
Timestamp in table not recognized as time value
It likel;y needs to be converted to a datetime array — timestamp = '2020-08-03T20:40:00.000Z' datetimestamp = datetime(timest...

4 years ago | 2

| accepted

Answered
Identification of a curve
If they are the same lengths, I would use either pdist2 or knnsearch to dientify them. Since they have different amplitudes, it...

4 years ago | 0

Answered
What format is required for Matlab LSIM Function input data?
The difference between continuous and sampled signals iis simply one of context. Ths signals sthemselves do not exist in z-spac...

4 years ago | 0

| accepted

Answered
Power spectrum and periodicity
There are a number of functions in the Spectral Estimation section of the Signal Processing Toolbox documentation that will work...

4 years ago | 0

| accepted

Answered
Convolution not working with 'uint16'
That likely has to do with the precision of the calculations. I would convert them to double, do the calculations, and then con...

4 years ago | 0

| accepted

Answered
How to Smooth a plot conserving some point?
Experiment with the interp1 function, using the 'pchip' method. It may be necessary to use linspace to increase the number of p...

4 years ago | 0

| accepted

Answered
Extract specific values and row coloumn information in matrix
Try this — M = randi([0 7], 5, 6) % Example Matrix [r,c] = find(M == 5); ...

4 years ago | 1

Answered
Why does an error saying "Unrecognised function or variable" occrurs while solving a two variable polynomial equation numerically using vpasolve
Needs parentheses, single quotes, and some other tweaks — % clc;clear;close all; x = sym('x'); % sym(t); t= 0.1:0.01:1; fo...

4 years ago | 0

| accepted

Load more