A répondu
how to create legend from neighboring column in 3d plot
Why folks continue to beat head against wall with deprecated xlsread is beyond ken... fn='https://www.mathworks.com/matlabcentr...

environ un mois il y a | 0

| A accepté

A répondu
Add commas between number columns from text file
Given the fixed format nature of these files, the best thing to do is probably to just build a specific fixed-width import optio...

environ un mois il y a | 0

A répondu
Add commas between number columns from text file
fn='https://www.mathworks.com/matlabcentral/answers/uploaded_files/1367139/ReactionsPortic5Combination4.txt'; opt=detectImportO...

environ un mois il y a | 0

| A accepté

A répondu
How to create string of text-objects
Holding disparate data types would be a good place to use a table as alternative to the cell array... D = [randi(100,10,1),rand...

environ un mois il y a | 1

| A accepté

A répondu
How do I save the output from a double for loop to a vector?
counter = 0; VectorOfValues=zeros(24,1); % preallocate for n = 0:23 for i = 1:height(Exceldata) if (duration(n,0,0...

environ un mois il y a | 1

| A accepté

A répondu
Graphing an array by largest row to smallest row
output_array = {[1,2,3]+0; [1,2,3,4,5]+0.1; [1,2,3,4]+0.2}; [~,ix]=sort(cellfun(@numel,output_array),'descend'); ix=num2cel...

environ un mois il y a | 0

A répondu
How to sorting categorical array for plotting
function male=MakeMaleSample(n) male=categorical("M"+1:n,"M"+1:n); end To force a non-lexical sort order, you have to speci...

environ un mois il y a | 1

A répondu
Place filenames with common pattern in a cell array
C = {'breakpoint_b40_f15.txt', 'breakpoint_b50_f15.txt', 'breakpoint_b40_f20.txt', 'breakpoint_b50_f20.txt', 'breakpoint_b40_f25...

environ un mois il y a | 0

| A accepté

A répondu
I am getting "Conversion to logical from table is not possible." error, how do you solve it?
... data1 = readtable('data1.csv'); data2 = readtable('data2.csv'); ... You read a csv file as a table; the two variables ar...

environ un mois il y a | 0

A répondu
Subdividing column matrix based on two stored indices of different lengths
A = [0.0048;-0.001;-0.0042;0.0047;-0.00011;0.0025;0;0;0;0;0.0023;0.0004]; order =[4;5;6;7;8;9;1;2;3;10;11;12]; pull = [7;8;9...

environ un mois il y a | 0

A répondu
ERA5-Land: error calculating hourly radiation
Seems very peculiar way to have done, but I'd just fix the date and then process by it instead... % Load the NetCDF file ... ...

environ un mois il y a | 0

A répondu
Separating text files according to latitude and longitude
Sure. Just read the lat/lon data file, substitute the dot woth underscore and do a dir() with that string in the filename wildc...

environ un mois il y a | 0

A répondu
I have a problem regarding an Index because it exceeds array bounds.
It would appear that the X array is 37xN instead of Nx37... BTW, you don't need a loop to compute the difference; diff() is vec...

environ un mois il y a | 0

A répondu
How do I group data into different groups based on values of 2 columns for analysis?
fn='https://www.mathworks.com/matlabcentral/answers/uploaded_files/1361218/position_velocity%20data.xlsx'; tLC=readtable(fn); ...

environ un mois il y a | 0

| A accepté

A répondu
Why are my line plots are coming out improperly?
Well, there's no "problem" with the nested loop other than apparently it isn't what you intended... :) It iterates through each...

environ 2 mois il y a | 0

| A accepté

A répondu
How can I properly extract individual filenames, with often times similar naming?
Putting meta-data into the file names is a large part of the issue; but if the files are something other than data files that ar...

environ 2 mois il y a | 1

| A accepté

A répondu
Matching two array elements by rounding up and down
fn='https://www.mathworks.com/matlabcentral/answers/uploaded_files/1359918/data_list.txt'; tT=readtable(fn); ix=isfinite(tT.B)...

environ 2 mois il y a | 2

| A accepté

A répondu
Can I remove the date from big data set text file?
Not easily, no you can't ignore the date because the file is tab delimited and the date/time is a single string. To ignore it a...

environ 2 mois il y a | 0

| A accepté

A répondu
Fastest way to search files by pattern name
As far as the original Q?, it's owing to how the underlying OS processes the dir command -- when you ask for a directory listing...

environ 2 mois il y a | 0

| A accepté

A répondu
How to identify text files with zero value
"...is any way to extract the text files[?]" What do you mean by "extract", precisely? What is the end result you're after; to...

environ 2 mois il y a | 0

| A accepté

A répondu
Writing txt files accurately with a restriction on the number of columns.
Still with same idea but a little cleaner implementation... %a=randi(200,[1,25]); %fmt=['%d' repmat(',%d',1,numel(a)-1)]; %s=...

environ 2 mois il y a | 0

A répondu
Writing txt files accurately with a restriction on the number of columns.
a=randi(200,[1,25]); fmt=['%d' repmat(',%d',1,numel(a)-1)]; s=sprintf(fmt,a) LL=25; L=strlength(s) O=[]; while L>0 I=st...

environ 2 mois il y a | 2

| A accepté

A répondu
I have 400 columns of matrix, I want to calculate FWHM. I'm trying find codes related to find peaks, but nothing works. I cannot see the FWHM as 400 different columns.
fn='https://www.mathworks.com/matlabcentral/answers/uploaded_files/1356933/ace%20re.xlsx'; data=readmatrix(fn); whos data plo...

environ 2 mois il y a | 1

| A accepté

A répondu
Extract numbers from matrix based on logical array
x =[ 0.5853 0.2551 0.8909 0.2238 0.5060 0.9593 0.7513 0.6991 0.5472].'; y =logical([ 0 1 1 1 ...

environ 2 mois il y a | 1

A répondu
How to know the range automatically identified by readtable when importing an Excel file?
It will be only as good as the ability of the detectImportOptions bot's ability to recognize the start of the data, but opt=det...

environ 2 mois il y a | 0

| A accepté

A répondu
I am using writetable for exporting the workspace variables into excel sheet
Read the rest of the doc, specifically the <named parameters for spreadsheets only> section, you'll be particularly interested i...

environ 2 mois il y a | 0

A répondu
How do I create a For loop from a string array that will fill and load h5 files?
I didn't see @Stephen23 had already addressed the main iissue, but had already started, so... d=dir('*Walk.h5'); for i = 1:num...

environ 2 mois il y a | 0

| A accepté

A répondu
Converting table data to datetime
tbldata=readtable('pipe2_st.csv'); tbldataarray=table2cell(tbldata); Don't convert the table to a cell array, use the table yo...

environ 2 mois il y a | 0

A répondu
Changing step tolerance for lsqcurvefit
opt=optimoptions('lsqcurvefit'); opt.StepTolerance=1E-8 in your code above ... Dab = lsqcurvefit(@f, x0, t, c) % fitting Dab...

environ 2 mois il y a | 0

| A accepté

A répondu
Why is FFT result divided by NFFT instead of the root of NFFT?
Well, let's try it and see... Fs = 1000; % Sampling frequency T = 1/Fs; % Sampling period L = 1500; ...

environ 2 mois il y a | 1

Charger plus