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

oltre 4 anni fa | 1

| accettato

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

oltre 4 anni fa | 0

| accettato

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

oltre 4 anni fa | 0

| accettato

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

oltre 4 anni fa | 1

| accettato

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

oltre 4 anni fa | 1

| accettato

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

oltre 4 anni fa | 0

| accettato

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

oltre 4 anni fa | 0

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

oltre 4 anni fa | 1

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

oltre 4 anni fa | 0

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

oltre 4 anni fa | 0

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

oltre 4 anni fa | 0

Risposto
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 '...

oltre 4 anni fa | 0

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

oltre 4 anni fa | 1

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

oltre 4 anni fa | 0

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

oltre 4 anni fa | 0

| accettato

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

oltre 4 anni fa | 0

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

oltre 4 anni fa | 1

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

oltre 4 anni fa | 0

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

quasi 5 anni fa | 0

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

quasi 5 anni fa | 0

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

quasi 5 anni fa | 0

| accettato

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

quasi 5 anni fa | 0

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

quasi 5 anni fa | 0

| accettato

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

quasi 5 anni fa | 2

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

quasi 5 anni fa | 0

Risposto
using external matlab file variables in app desighner
"is there some example i could follow?" -- @fima v function UpdateButtonPushed(app, event) app.UpdateButton.Enable='off'; ap...

quasi 5 anni fa | 0

Risposto
Changing names and removing quotes in row2vars output table
As always, if you would show the code you used to create the table, it would make our job much easier... The table command and ...

quasi 5 anni fa | 0

| accettato

Domanda


Using Cells() in VBA with Excel via ActiveX
While off topic, there are enough using Excel and ActiveX that it is a pretty active subject area, so I'll add one more I couldn...

quasi 5 anni fa | 1 risposta | 0

1

risposta

Risposto
Plot 3 lines using plotyy with Different X-axis
plotyy creates two overlaying axes; you've created two sets of those and there's no way to not occlude one axis with the other, ...

quasi 5 anni fa | 0

Risposto
How do I overlap boxplots on top of each other for the same x-axis?
Use boxchart and the grouping by color option probably best builtin solution...

quasi 5 anni fa | 1

| accettato

Carica altro