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

4 years ago | 0

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

4 years ago | 0

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

4 years ago | 1

| accepted

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

4 years ago | 0

| accepted

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

4 years ago | 0

| accepted

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

4 years ago | 1

| accepted

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

4 years ago | 1

| accepted

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

4 years ago | 0

| accepted

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

4 years ago | 0

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

4 years ago | 1

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

4 years ago | 0

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

4 years ago | 0

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

4 years ago | 0

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

4 years ago | 0

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

4 years ago | 1

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

4 years ago | 0

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

4 years ago | 0

| accepted

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

4 years ago | 0

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

4 years ago | 1

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

4 years ago | 0

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

4 years ago | 0

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

4 years ago | 0

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

4 years ago | 0

| accepted

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

4 years ago | 0

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

4 years ago | 0

| accepted

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

4 years ago | 2

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

4 years ago | 0

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

4 years ago | 0

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

4 years ago | 0

| accepted

Question


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

4 years ago | 1 answer | 0

1

answer

Load more