Community Profile

photo

Peter Perkins

MathWorks

Last seen: 12日 前 2011 以来アクティブ

Statistics

All
  • Personal Best Downloads Level 1
  • 5-Star Galaxy Level 3
  • First Submission
  • 36 Month Streak
  • Guiding Light
  • Thankful Level 1
  • Revival Level 2
  • Knowledgeable Level 4
  • First Answer

バッジを表示

Content Feed

表示方法

回答済み
Subset timetable by specific time windows/periods
This post is more than a year old, but I'm responding in hopes that it might help anyone who looks at this. First, I don't unde...

約2ヶ月 前 | 0

回答済み
ismember: Find matching entries in table columns (and add entry from matching row)
This is a one-liner with tables: >> A = table([1;3;5]) A = 3×1 table Var1 ____ 1 3 5 >> ...

3ヶ月 前 | 0

| 採用済み

回答済み
Using index to match rows of table
Lukas, you don't say what you actually need to do after getting those rows, but I'm going to suggest that you should be using ro...

3ヶ月 前 | 0

回答済み
How to Create txt output from multiselect file by using readtable?
This code DATE = T{:,1}; TIME = T{:,2}; TIME.Format = 'hh:mm:ss'; DOH = T{:,3}; ...

3ヶ月 前 | 0

回答済み
How to convert a minutes elapsed vector to time (hh:mm)?
"continous 24 hour measurement" sounds like you are dealing with time of day. If you add 600 minutes to hours(16), you will get ...

3ヶ月 前 | 0

回答済み
Insert new row with values in a table before specific values
It is possible to just use tabular subscripting to insert these rows. This is kind of old school MATLAB. Don't know if it is eas...

3ヶ月 前 | 0

回答済み
Plot a timetable for charging electric vehicles
Sure. It looks like you want to overlay not only all stands, but also all days on one (24 hour?) time of day axis. That makes it...

3ヶ月 前 | 0

| 採用済み

回答済み
How to separate two graphs plotted in one figure into two separate figures?
If spikes were two separate variables in a timetable (see splitvars), this would just be stackedplot(neural).

3ヶ月 前 | 0

回答済み
How do I add a label on each bar of a multiple bar chart? I want to add specific times as labels.
I bet there's a way to simplify the arguments to your bar command. What about something like bar(T_Smooth.X(1:4),T_Smooth{1:4,[...

3ヶ月 前 | 0

回答済み
Operator '==' is not supported for operands of type 'table'.
There are a couple of problems. c is a table, so R = c(:,"SAPID") is also a table, with only one variable. A table is a contai...

3ヶ月 前 | 1

回答済み
Dividing grouped data into equally sized subgroups
>> x = rand(16,1); >> g = repmat((1:2)',8,1); >> t = table(g,x) t = 16×2 table g x _ _______ ...

3ヶ月 前 | 1

回答済み
Trying to get time between each start and stop & total time per day from a text file.
I would go with unstack: >> T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/702232/FDATA.TXT'); ...

3ヶ月 前 | 0

回答済み
How to vertically join differently sized tables?
One way is to "assign off the end": >> table1 = table(1,70,175,29,datetime(1992,7,1),"M",'VariableNames',{'Num','Weight','Heigh...

3ヶ月 前 | 1

| 採用済み

回答済み
Connect correct temperature to another table based on time
Use timetables. It's a one-liner: >> A = timetable(datetime(["13-aug-2020";"14-aug-2020";"15-aug-2020"]), [13.8; 12.2; 8.5]) ...

3ヶ月 前 | 1

| 採用済み

回答済み
bar graph with non numerical x-axis
Simon's solution is one way to do it. But using categorical just to label the bars is kind of an abuse of categorical, which is ...

3ヶ月 前 | 0

回答済み
How to treat a duration array in a for loop?
Judith, I can't really follow what you are doing, but if you have timestamped data, you should be using a timetable, and then re...

3ヶ月 前 | 1

回答済み
Reorganize table and make groups of rows to columns
You need unstack: >> Date = datetime(1963,[1;2;3;1;2;3;1;2;3],[31;28;29;31;28;29;31;28;29]); >> Permno = [10065;10065;10065;10...

3ヶ月 前 | 2

| 採用済み

回答済み
Delete rows in cell aray where there is anything in one collum.
A cell array is the wrong way to store these data. You want a table, or probably a timetable. The fact that you say, "the name o...

3ヶ月 前 | 0

| 採用済み

回答済み
Prevent overwriting within a for loop in 3D-motion tracking
You may just want T = table(); for ... ... T = [T; readtable (thisFile)];

3ヶ月 前 | 0

| 採用済み

回答済み
How to convert the number of seconds from an epoch into UTC using the datetime function.
Matthew, this is easier than you think. In MATLAB, 'TimeZone','UTC' is sort of a ficticious timeline that pretends that leaps se...

3ヶ月 前 | 0

| 採用済み

回答済み
How to plot only the matches of two different datetime?
If all you have are two datetime vectors, you can use intersect to find the common values. But I'm guessing you have other data ...

3ヶ月 前 | 0

回答済み
How to filter the data.
Not sure how you are getting those data into MATLAB, but I suggest that you figure out why you have a cell array. You want a tab...

3ヶ月 前 | 0

回答済み
extracting columns from multiple cell arrays consist of table data
If you've read two "similar" tables into a 2x1 cell array, best ting to do is to vertvat them outside the loop: >> C = {array2t...

3ヶ月 前 | 1

| 採用済み

回答済み
split cell in 2 columns
Use cellfun, two possibilities: function [val1,val2] = myfun1(x) val1 = x(1); if isscalar(x) val2 = 0; else val2 =...

3ヶ月 前 | 0

回答済み
How do I find the corresponding date/time value of the maximum of my data in a table?
This is a pretty common question, so I'm gonna show a bunch of stuff in hopes others can find it useful. Let's start with a sim...

3ヶ月 前 | 0

| 採用済み

回答済み
how to sort a cell array inside a struct?
I think you would be better off with a table than a struct. Name_Code = table(IDs, C,'VariableNames',["Name" "Codes"]) Name_Co...

3ヶ月 前 | 0

| 採用済み

回答済み
Error with splitting table into separate columns.
This is an application of unstack and then stack. The code looks a lot more complicated than it might if I hard-coded in sizes, ...

3ヶ月 前 | 0

| 採用済み

回答済み
Coordinate interpolation with time
This line of code pf = polyfit(Lat(:,1) Lat(:,2)], [(Long(:,1) Long(:,2)] %Coordinates is not valid syntax for several reasons...

3ヶ月 前 | 0

回答済み
Smartly search between tables
This would be trivial if varfun accepted more than one table input, but it doesn't do that. But you can make one table that look...

3ヶ月 前 | 0

回答済み
Calculete monthly anomalies time series temperature
You are not doing yourself any favors by using raw numeric vectors with no timestamps. This is almost trivial using datetime and...

3ヶ月 前 | 0

もっと読み込む