Réponse apportée
Plotting two curves on a Datetime scale.
t1=datetime(t1,'InputFormat','uuuu-MM-dd''T''HH:mm:SS'); % convert first to datetime t2=seconds(0:20:280).'+t1(1); ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How to determine values between two points and two times?
<Subscript-into-times-of-timetable> illustrates the time range. Logical addressing on variables is simply writing the expressi...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
how do i use a vector has my input in matlab to find the quadratic equation of numbers
They already are if that's what you pass the function when you call it. Matlab is polymorphic; the argument variable in the fun...

plus de 6 ans il y a | 0

Réponse apportée
Save file sizes not lining up
Any insight would depend upon knowing precisely what the "slice and dice" consisted of and the specifics of the struct There's ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Reading multiple txt data
txtfiles = dir('C:\Users\User\Documents\MATLAB\signal\signal*.txt'); ttrigger = dir('C:\Users\User\Documents\MATLAB\signal\trig...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Not enough input arguments.
Looks disjointed in the error message but in function [N,B,Jac] = shapeQuadratic(x1,x2,x3,xi) there are four arguments require...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
how to plot data more than one time?
N=20; plot([0:N*numel(y)-1],repmat(y,1,N))

plus de 6 ans il y a | 0

Réponse apportée
How can I run through an array and pick out certain values by condition
Start by finding locations of ix=[false diff(events)==1)] then locate the discontinuities in those stretches. Then it's the med...

plus de 6 ans il y a | 0

Réponse apportée
Using Accumarray with @maxk instead of @max?
Don't see anyway around with accumarray because the VAL parameter must be 1:1 with rows of SUBS; use findgroups/splitapply or va...

plus de 6 ans il y a | 0

Réponse apportée
Making decade time-series
roundyrs=fix(years(dt)/10)*10; n=histc(roundyrs,min(roundyrs):10:max(roundyrs)); results in >> [[min(roundyrs):10:max(roundyr...

plus de 6 ans il y a | 0

Réponse apportée
How to plot bar chart with error bars
See <Answers Error-bars-in-bar-plot> and the other link there

plus de 6 ans il y a | 0

Réponse apportée
Import many excel files to Matlab- How to?
"...they have very different names (city names) but all of them are in E:\test\ folder." Ok so just use the dir() solution (my...

plus de 6 ans il y a | 0

Réponse apportée
How to read Binary from a txt file and assign it to row vector
Will have to read as char() and convert. For the one record, first cell... >> x=textscan(s,'%s %s %f'); >> A=str2num(char(x{1...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
how to convert mat file to tab delimited text file
load will load whatever variable(s) were stored in the .mat file into the workplace, using the name the variables have in the fi...

plus de 6 ans il y a | 0

Réponse apportée
fprintf- I dont want to print one result.
A number of ways...one would be to include the fprintf statement in an if....end clause itself on value of N (or x). Another wo...

plus de 6 ans il y a | 2

Réponse apportée
How to remove elements from the vector while we save the index of those removed elements?
That's simply the complement of the indices you saved...brute force is >> ix=1:numel(b); ix(1:3:end)=[]; >> ix ix = 2 ...

plus de 6 ans il y a | 0

Réponse apportée
Sorting Data by Part of Column Name
This is basically trivial exercise for Matlab... >> t=readtable('DataDK.xlsx'); % read the file into table Warning: Variable ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
how to ignore an index error?
H=[0 1 0;1 0 1; 0 1 0]; % filter coefficients u(2:end-1,2:end-1)=(c(2:end-1,2:end-1)+f...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Delete specific rows from a cell array and create a new cell array
Place where converting the cell array to regular double array makes sense it would seem...there's nothing in the above data that...

plus de 6 ans il y a | 1

Réponse apportée
Error using fprintf when copying cell content into a text file
Having data helps...to achieve the objective in the easiest way w/o writecell, use the intermediary of converting to a table... ...

plus de 6 ans il y a | 1

Réponse apportée
error bars in bar plot with categories
This is a royal pain for even numeric axes; even worse for categorical. Complain to TMW about the sorry quality of implementati...

plus de 6 ans il y a | 0

Réponse apportée
plot with points in file
Well, still kinda' difficult to figure out exactly what is wanted, but as near as I can make out, something like; t=readtable('...

plus de 6 ans il y a | 0

Réponse apportée
Using loglog to plot results in a y axis that is not log scaled. But matlab seems to think it is
Set ylim([5 15]) to have sufficient part of the y-axis showing to be able to see the difference in the log scale vis a vis lin...

plus de 6 ans il y a | 0

Réponse apportée
timeseries date data matlab
Either however you created the text file and/or imported it, you ended up with the datenum integer portion of the date/time info...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
I want to create multiple buffers one after the other. How do ensure that they show in a random order?
Simplest would be to create N objects in (say) a cell array. Then generated a randomized indexing vector as |randperm idxrand=...

plus de 6 ans il y a | 0

Réponse apportée
char time: wrong label on years
The problem is the explicit four-digit string for the year -- that overrides any pivot year input for either datenum/datestr as ...

plus de 6 ans il y a | 0

Réponse apportée
Using dir to extract the names of plexon files for upload
targetDir='WhteverisDirNeeded'; d=dir(fullfile(targetDir, '*.plx')); % return all files of desired extension for i=1:numel(...

plus de 6 ans il y a | 0

Réponse apportée
Shuffle the rows a matrix
ir=randperm(1:numel(y)); % since y is 1D; otherwise use size(y,1) y=y(ir); x=x(ir,:);

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Summation of Infinity Terms
S = 0; tol = eps; term = inf; n = 1; If (x<1) 'not valid starting points enter another points' end while abs(term) > tol ...

plus de 6 ans il y a | 1

Réponse apportée
Get every first value above a treshold out of an array
B=([0 diff((A>trsh)-1)]==1); For comparison, >> [A;B] ans = Columns 1 through 27 1 2 3 4 5 6 2 3 4 5 6 3 4 5...

plus de 6 ans il y a | 0

| A accepté

Charger plus