Respondida
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...

más de 3 años hace | 0

Respondida
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); ...

más de 3 años hace | 0

| aceptada

Respondida
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...

más de 3 años hace | 0

| aceptada

Respondida
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...

más de 3 años hace | 1

| aceptada

Respondida
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)...

más de 3 años hace | 2

| aceptada

Respondida
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...

más de 3 años hace | 0

| aceptada

Respondida
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...

más de 3 años hace | 0

| aceptada

Respondida
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...

más de 3 años hace | 0

| aceptada

Respondida
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=...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 2

| aceptada

Respondida
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...

más de 3 años hace | 1

| aceptada

Respondida
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 ...

más de 3 años hace | 1

| aceptada

Respondida
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...

más de 3 años hace | 0

| aceptada

Respondida
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...

más de 3 años hace | 1

Respondida
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...

más de 3 años hace | 0

| aceptada

Respondida
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...

más de 3 años hace | 0

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

más de 3 años hace | 0

| aceptada

Respondida
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; ...

más de 3 años hace | 1

Respondida
Find the average between each pair of points in a matrix
I'd do it as z=randi([-5 5],8) za=filter2(ones(2)/4,z) % averaging 2D filter with same size as input (zero padded) zv...

más de 3 años hace | 1

Respondida
Array rows differences and array filling in a loop
The cell array @Jon shows is simpler to code and what first strikes, but the answer to the Q? as you posed it to store into the ...

más de 3 años hace | 1

Respondida
How do I edit this bar graph so that the weights appear equally distanced on the x-axis with 4 bars for each weight, all of different colour.
The weights vector is 'x' There are examples of grouped bar plots at the doc page...sorry, I said 'stacked' before; that's what...

más de 3 años hace | 0

Respondida
Fit a equation to a scatter plot in log log scale with the given parameters
fn='https://www.mathworks.com/matlabcentral/answers/uploaded_files/1350879/Data_1.xlsx'; A=readmatrix(fn); x=A(:,1); y=A(:,2)...

más de 3 años hace | 0

Respondida
How do I edit this bar graph so that the weights appear equally distanced on the x-axis with 4 bars for each weight, all of different colour.
Use X as a vector as categorical (or if numeric, use 1:N and then write the x tick labels with the desired values for display), ...

más de 3 años hace | 0

Respondida
How can I pass a large function into ODE45?
Write your function as an m file and pass a handle to it; don't try to do stuff in scripts or complicated stuff as anonymous fun...

más de 3 años hace | 1

Respondida
Extract matching row from another cell array
Air code; the load operation didn't work online... >> load all_files >> pieces=split(extractBefore(all_files,'.'),'_'); Error...

más de 3 años hace | 0

| aceptada

Respondida
how to find the location of a specific element in a matrix or in a excel file
What do you mean "to find the location of each element"? You mean just read the file, don't you; the location is really of very...

más de 3 años hace | 0

| aceptada

Respondida
How I can find a specific word in a notepad text?
"i want to find the word " lege" in the document and then to count how mnay times apear this specific word" txt=readlines('your...

más de 3 años hace | 2

| aceptada

Respondida
Matlab App Designer - Output to TextArea Error - 'Value' must be a character vector, or a 1-D array of the following type: cell array of character vectors, string, or categori
app.ClassificationTextArea.Value{i+1} = classification; tries to address the .Value property as a cell array which it doesn't s...

más de 3 años hace | 0

Respondida
Editor Text Is Too Small
The Editor Font selection is buried under the "Fonts -- Custom" menu in the Preferences. Why it's not associated with the Edito...

más de 3 años hace | 1

| aceptada

Respondida
Formatting read data from text files
txt=readlines('YourInputFile.txt'); % read text file as string array fprintf('%s\n',txt) % dumpt to com...

más de 3 años hace | 1

Cargar más