Respondida
Save a table of results to an Excel file
Excel "knows nuthink!" about cell arrays; every cell can contain only one value. You'll have to expand to an array of sum of co...

más de 4 años hace | 0

Respondida
extract data from string
The dead-ahead approach... >> tok=split(s,','); >> str2double(tok([4:5 10:11])) ans = 0.45274 5.1296e-06 ...

más de 4 años hace | 1

Respondida
Index in position 1 is invalid. Array indices must be positive integers or logical values.
In new_roi = filtered(Schwerpunkte_X(i) - delta_x(j) : Schwerpunkte_X(i) + delta_x(j), ... Schwerpunkte_Y...

más de 4 años hace | 0

| aceptada

Respondida
Plot with two x axis and proper scaling/aligning
The idea is to set the limits of the second axes to the values corresponding to those of the first so the two plots are identica...

más de 4 años hace | 0

Respondida
How to remove the first element and last element based on First column
Of course there is. :) But, specifically how to do so is dependent on answer to several other questions regarding what is re...

más de 4 años hace | 0

Respondida
How to crop the initial values and the last values of a column
The 'Range' named input parameter to readtable refers to the range of an input Excel spreadsheet and is not dynamic in its defin...

más de 4 años hace | 1

| aceptada

Respondida
I have a txt file containing a Matrix separated by commas. I would like to add a comma after the last column on every row.
data=readlines('yourfile.txt'); % read file as string array data=data(strlength(data)>0); ...

más de 4 años hace | 0

| aceptada

Respondida
I need a little help with reading from file.
That's an annoyingly difficult form to parse -- looks nice to read, but the mixture of text and data and different number variab...

más de 4 años hace | 0

| aceptada

Respondida
How to create new matrix in for loop?
MATLAB is "MATrix LABoratory" -- it operates on matrices and arrays by builtin syntax; that's a primary source of its power and ...

más de 4 años hace | 1

| aceptada

Respondida
Find time between 2 given time
OK, the above is one simple-minded approach that might work depending on the needs...another that works with the given data and ...

más de 4 años hace | 1

| aceptada

Respondida
Reading a file without extension
Take @Stephen's comments to heart; they're important. D='/hamzah/adda/src/seq/results/test/run002_cylinder_g25_m1.105'; txt=re...

más de 4 años hace | 0

| aceptada

Respondida
Conconate arrays horizontally in an automatic manner
"The MATLAB way" around such problems is to not create sequentially-named variables of the type RFn but use either cell arrays o...

más de 4 años hace | 0

Respondida
Find time between 2 given time
You're overthinking the problem methinks... :) load hrs hrs=str2double(extractBefore(extractBefore(hrs,'-'),':')); % convert ...

más de 4 años hace | 1

Respondida
Warning: R-square and the F statistic are not well-defined unless X has a column of ones.
Per the documentation and examples, regress does NOT include an intercept term by default; you must explicitly code and add the ...

más de 4 años hace | 0

Respondida
Why is my 'n' only 1?
You define peak_point_B = (peak_point_2(:,1)) - 1; outside the loop from a given file then try to use it as the second dimens...

más de 4 años hace | 0

Respondida
Box plot doesn't show upper or lower whiskers
The range of the two variables is so tight there simply isn't sufficient resolution on the plot -- try ylim([0.25 0.30]) and I...

más de 4 años hace | 0

Respondida
xmax is scalar floating function ?
... %Enter the outer integral upper limit:a ... a isn't defined above; it must be a numeric value; you passed the character '...

más de 4 años hace | 0

Respondida
I cannot change the datetime x axis locale setting in the plot function.
Since your UI is in Koren, the system LOCALE is set to it. I don't know all there is to be known about how MATLAB uses the LO...

más de 4 años hace | 1

Respondida
Matrix extension by inserting 0
M1=eye(4); % simply symmetric matrix to play with N=2; ...

más de 4 años hace | 0

Respondida
How to convert elapsed time in an excel file to timetable?
MATLAB datetime must be a full date including the day and year as well as just the time of day. A time alone is a duration clas...

más de 4 años hace | 0

| aceptada

Respondida
Stacked Histogram and Further Categorization
Not too bad a task at all...consider tA=readtable("animaldata.xlsx"); tA.Animal=categorical(tA.Animal); tA.Category=categoric...

más de 4 años hace | 0

Respondida
Loop with "for" and "if" and then a scatter with different colors
Alternatively, gscatter with @DGM example... gscatter(x1,x2,mask,[],[],[],0,'X Variable','Y Variable') legend('Level 1','Level...

más de 4 años hace | 1

Respondida
How to make a function of a NaN filter
@Image Analyst showed an effective way to solve the problem, I'll show an alternative and make a couple comments on MATLAB codi...

casi 5 años hace | 0

Respondida
using ff2n(n) (two-level full factorial design) with n larger than 25 in my pc results in memory error
Well, if you really can beat my estimate of the total time per iteration of generating the factors and then doing whatever it is...

casi 5 años hace | 0

Respondida
modify XY axises of 2 graphs in one figure
"How can I adjust, X axis 0-313 (from matrix data) equal to 112.9292-125.9792 (from coast.mat) , similar with Y axis 0-409 (matr...

casi 5 años hace | 0

Respondida
How can I find a corresponding data value to a text value?
tToy=readtable(BehDataParticipant2,'ReadVariableNames',1,'VariableNamingRule','preserve'); tToy.LookLeftToy=categorical(tToy.Lo...

casi 5 años hace | 0

| aceptada

Respondida
Im trying to find the zeroes of the two lines on the graphs I've made
I lack symbolic TB, but it's easy enough to just find the crossing point from linear interpolation. MATLAB interp1 requires a u...

casi 5 años hace | 0

Respondida
creating a string multiple string filter on multiple columns
Without knowing the real application and how the data are obtained so it is presumed to already be character type, >> n=16;m=2;...

casi 5 años hace | 0

| aceptada

Respondida
What is this Number? 31.006276680299820175476315067101
1) >> format long,format compact >> pi^3 ans = 31.006276680299816 >> 31.006276680299816==pi^3 ans = logical 1 >...

casi 5 años hace | 2

Respondida
save loop data only if 'if statement' is true
As @Benjamin pointed out, for starters fix the loop construct and indexing... ... for i=1:numel(fileList) fullFileName = f...

casi 5 años hace | 0

Cargar más