Answered
Timestamp in ISO 8601 to yyyy-MM-dd HH:mm:ss
It's a pit(proverbial)a(ppendage) when vendor code produces nonstandard formats... S='0000-00-00T14:26:21:000'; % sample...

3 years ago | 0

| accepted

Answered
How to delete all files with a certain extension?
Because your count variable is being incremented in the outer loop which is running over a dir() list of all files (including su...

3 years ago | 0

| accepted

Answered
I need my graphs to display my data but they are showing up empty
No, the size of a is 1,1; the value of a is 3. Hence, you compute only one value and all your plot is/will be is a single point...

3 years ago | 1

Answered
Polyfit plot just need one line
That looks like your data are just a scatter all over and you're asking polyconf to evaluate the fit and the intervals over all ...

3 years ago | 0

| accepted

Answered
Link Excel spreadsheet to Matlab
sheet=get(ex.sheets,'Item',1); should work. There's a whole litany of what will/won't actually get resolved through the COM e...

3 years ago | 0

Answered
How can one calculate Differentiation of matrix array with time as first column and data as second column ?
g=diff(v(:,2))./diff(v(:,1)); % numerical gradient The gradient vector estimate will be one element shorter than the inpu...

3 years ago | 1

Answered
How to sort data files without actually writing these files
Well, maybe I'll take a shot at it and see if get the idea... First a comment on the existing code -- in ... l = fget...

3 years ago | 0

| accepted

Answered
Read data from .txt file
The file and your local system LOCALE setting aren't in synch it appears -- the default MATLAB locale is US which uses the decim...

3 years ago | 0

Answered
i have to get similar output as i have uploaded.why my data is getting repeated again and again?
Carrying on from @David Hill's most excellent start, tT=readtable(websave('input.csv','https://www.mathworks.com/matlabcentral/...

3 years ago | 0

Answered
read text file - header and numerical part
Q1: A. See fgets to keep newline B: Don't need ExtractBetween, use ExtractAfter; then don't need the actual \n in the d...

3 years ago | 0

| accepted

Answered
How to remove compare 2 arrays so that when there is a in a column, it removes the column in another array
You have only one row logical but three rows of labels??? But, assuming that's expected and the need is to remove all columns t...

3 years ago | 1

| accepted

Answered
How to solve this errror about reading in complex numbers?
Previously answered what appears to be virtually identical Q? <answers/1818965-how-to-read-only-last-2-columns-of-csv-format-fi...

3 years ago | 0

Answered
How do you insert a row or a column into a cell array?
No differently than with any other array -- although inserting in the middle somewhere requires copying (although with cell arra...

3 years ago | 3

| accepted

Answered
How to label X-axis on bar graph?
cats=categorical(["Baseline";compose('Food deprivation(Week%d)',[1:3].')]); results=randi(20,4,1); bar(cats,results) The prob...

3 years ago | 1

| accepted

Answered
How do I use a variable assigned in one function to call another function?
Forget global exists; for virtually all cases, it's not the better solution. Instead, use the return values your function(s) ca...

3 years ago | 0

| accepted

Answered
one column in to multiple column
It's not possible to have a table with different number or rows by variable(column); MATLAB is NOT a spreadsheet (which is agood...

3 years ago | 0

Answered
Filling missing times in timetable with NaN using retime
load(websave('data.mat','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1148080/data.mat')) ttD=data_site_num_t...

3 years ago | 0

Answered
Axes not reconizing figure handle
hF=figure; hAx=axes(hF,'Position',[0.1300 0.3300 0.7750 0.700]); xlabel(hAx,'SomeText') ylabel(hAx,'MoreText') xlim(hAx,[0 3...

3 years ago | 0

| accepted

Answered
Sorting Data into a Table
% make up some data N=randi(5,3,1); x=[];for i=1:numel(N),x=[x;i*ones(N(i),1)];end x=x(randperm(numel(x))) % the engine (cel...

3 years ago | 0

Answered
Plotting a two peak model as a fitted line on a probplot.
Actually, when I had a few minutes to think about it, it's not too hard; you just have to define the associated CDF function to ...

3 years ago | 1

| accepted

Answered
Suppose i have a 1000*24 binary vectors each having 4 ones and 20 zeros in each row .Now want to extract the spcific vectors that have ones only at the speific positions.
Is that two separate cases of 12:15 AND 14:17 or one case that includes both cases? And is it all or any that must be 1? V1=12...

3 years ago | 0

| accepted

Answered
Folder names sorting issues after reading from directory
I've never noticed a case in which dir returned a list differering in order from that returned by the OS -- what if you look at ...

3 years ago | 0

Answered
How to use num2str inside text with latex interpreter?
i=1; text(0.4,0.5,"L_{" + i + "}") i=i+1; text(0.4,0.4,"\it L_{" + i + "}") i=i+1; text(0.4,0.3,"\it L\rm_{" + i + "}") Va...

3 years ago | 1

Answered
Reuse figure/axes properties from figure A for figures B,C,D
hAxGolden=gca; % the gold standard hF=figure; % create new figure hAx=copyobj(hAxGolden,hF);...

3 years ago | 0

Answered
Loop through files of different length
When you compute what h is in samples (if sample rate varies, otherwise just set it as a constant), then [R,C]=size(ECGdata); ...

3 years ago | 1

| accepted

Answered
I have a .txt file that I need to turn into a vector
v=readmatrix('YourFile.txt');

3 years ago | 0

Answered
how to read only last 2 columns of csv format file?
data=readtable(websave('plot.csv','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1147855/plot.csv'),'readvariab...

3 years ago | 0

Answered
How do I get the line of best fit and its equation from multiple datasets?
Presuming the problem with the file location is resolved, a fresh start is in order -- readvars is not a good choice here it wou...

3 years ago | 0

Answered
Represent the total mask usage data (for all counties) in a form of a pie chart
explode=[]; to not use the parameter; the empty cell array doesn't work, the empty double does; a logical array is expected.

3 years ago | 0

Load more