Answered
find peaks and distance between the x axis
The position is NOT uniformly increasing -- is for most of the data, but not all... >> all(diff(data(:,1))>0) ans = logical...

24일 ago | 0

Answered
Remove non time string values in a time matrix
Use the datetime class is probably easiest...see if tm=datetime(time_mat,'InputFormat','hh:mm:ss.SSS'); % convert to...

24일 ago | 0

Answered
How to split up column vector
In general, if you're thinking of starting with vector V and creating subvectors, say, A, B, C, ..., this is a very bad idea. I...

24일 ago | 1

| accepted

Answered
How to create a matrix (64 X 6) with all numbers from 1 to 64, written by binary code?
D=double(dec2bin(0:63,6))-'0';

25일 ago | 0

| accepted

Answered
Split 2 lines of a matrix?
B=[A(3:4,:);A]; % create new array keeping old A=[A(3:4,:);A]; % new array replaces/augments old More genericall...

25일 ago | 0

| accepted

Answered
Dont know what Polyval is here doing :-/
You fit yd2 vs xd1 but then plotted against xd2. One presumes the fit should be against xd2 as well. BUT: A perfect illustrat...

25일 ago | 2

| accepted

Answered
Why does fplot think my function is not vectorized
Because fplot is just looking at the source code, not the output and it doesn't recognize the reshape operation at the end--only...

26일 ago | 1

Answered
How to pick a set of data close to one another
Is the reference fixed/known a priori, computed from the overall dataset...??? Presuming the former above and is xref, and othe...

27일 ago | 0

| accepted

Answered
How can I use 'regstats' to make a multiple linear regression with more than three predictor variables?
You've asked for a full quadratic model in 5 (not 4) predictor variables. That's a total of 5 quadratic + 5 linear + 9 (4+3+2) ...

28일 ago | 0

| accepted

Answered
How to filter out missing data from a text file with readtable()? Different data types in the same column.
Use the 'TreatAsEmpty' named argument to read the M lines as empty and will return NaN. Then just delete the rows that return i...

28일 ago | 0

Answered
how to split up column vectors into separate vectors from data
Build a ThingNum tracking id variable for each and then use findgroups and splitapply to analyze by group however desired. The...

29일 ago | 1

Answered
Calculate area under graph between two points
Start with doc findpeaks the optional output peak widths function with proper WidthReference level should give you all the inf...

29일 ago | 0

Answered
Matrix with repetitions of a vector
A=repmat(M,6,4); is what you say literally, but I don't follow what you mean by "with repetitions of the vector A, different to...

29일 ago | 0

Answered
I get "index must be a positive integer or logical. " Error, please help
"MATLAB is not C" ... for i=0:1:(c-1) %defining k1,k2 and k3 for each case k1(i)=f(t(i),y(i)); ... Matlab arra...

29일 ago | 1

Answered
How to save the leading zeroes to values
res=reshape(sprintf('%d',a),4,[]).'; pom=str2num(res); to produce the decimal representation of the bit pattern. Is this what...

29일 ago | 0

Answered
Concatenating two tables with different array lengths in a variable of type 'char'
"it makes me wonder if it's not possible to have strings of different length in a Table variable in different rows" Just like a...

30일 ago | 1

| accepted

Answered
Help me understand!
The key is line 17...

30일 ago | 0

Answered
How to make an array which plots certain points if another column has a certain value?
"Logical addressing"... isv=(v~=0); % the logical addressing vector for v plot(p(isv)) % plot the points (v...

30일 ago | 0

Answered
solving a function equal to zero
fsolve does the work for you...if you define the functional correctly-- fnY= @(x) (29-(6*x(1))-(18*x(2))); opt= optimoptions('...

약 1달 ago | 0

| accepted

Answered
Problem with overlapping bars in a plot with 2 y axis.
Answers/325849 bar graph with two yaxes Illustrates how to solve this...it's a pain TMW hasn't built a routine for such already;...

약 1달 ago | 0

Answered
I am trying to Combine a Line and a Bar Chart using Two y-Axes.
... yyaxis right hB=bar(C2,'FaceAlpha',0.80); ... Salt to suit...

약 1달 ago | 0

| accepted

Answered
Difficulty importing dates using readtable
The file doesn't match the format string -- it has a numeric value followed by two dates and who knows what else afterwards and ...

약 1달 ago | 0

| accepted

Answered
TEXTSCAN not value, comma, space problem.
Use readtable instead with a FixedWidthImportOptions object. You can begin by seeing if detectImportOptions can figure it out o...

약 1달 ago | 0

| accepted

Answered
how to solve exponential equation
opt= optimoptions('fsolve','Display','none'); X0=15; soln=arrayfun(@(e) fsolve(@(x) fnE(x)-e,X0,opt),ee); NB: There are two ...

약 1달 ago | 0

| accepted

Answered
how to solve exponential equation
fnE=@(x) 0.4075*exp(-((x-14.87)/11.39).^2) + 0.5621*exp(-((x-18.64)/27.74).^2); ezplot(fnE,[0 100]) hAx=gca; hL=hAx.Children;...

약 1달 ago | 0

Answered
How to extract values from array
disp(hist_points{5}(1)); % for first element in cell 5 Read up in the documentation on cell arrays about dereferencing.

약 1달 ago | 0

| accepted

Answered
Adding Zeroes and Ones into a Vector
>> v=reshape([reshape(v,[],3),[0 0 1].'].',1,[]) v = 0 0 1 0 0 1 0 0 1 0 0 1 ...

약 1달 ago | 2

| accepted

Answered
Nested FOR loops and creating text file (3d-layers) too slow.
So, as suspected, just generate the data to print and use the desired formatting string: % generate some sample data... A=1001...

약 1달 ago | 0

| accepted

Answered
How to delete repeating column or duplicate column in MATLAB? of type Double
>> uA=unique(A); >> B=[uA;histc(A,uA)] B = 1 2 3 4 5 2 2 2 2 1 >> ADDENDUM: Ab...

약 1달 ago | 2

Load more