Réponse apportée
How to make two different size matrix of same size
A1=[A1 A(:,end)]; could be one alternate solution...there is no unique answer without additional conditions placed on expected ...

environ 4 ans il y a | 1

Réponse apportée
Using indexed data to colour graph
See the documentation for the function rectangle() that you're using to do the drawing. The LH side of the page has links to th...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How can I plot these two variable in bars?
load sl % get variable titles T=categorical(T); % turn into categorical variable C=randi(200,1,n...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How to find the occurrence of an element in a column of a table
tYourTable.Status=categorical(tYourTable.Status); % more convenient thatn cellstr() in use tCounts=groupsummary(tYourTable,'St...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 0

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

environ 4 ans il y a | 1

Réponse apportée
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...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
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); ...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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 ...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
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 ...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 0

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

environ 4 ans il y a | 1

Réponse apportée
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 ...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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 '...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 1

Réponse apportée
Matrix extension by inserting 0
M1=eye(4); % simply symmetric matrix to play with N=2; ...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 1

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 0

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

plus de 4 ans il y a | 0

| A accepté

Charger plus