Réponse apportée
X must have length equal to the number of rows in Y, but I'm pretty sure they're the same size
nutrients14 is a table in which case those will be column vectors instead of row vectors and stackedplot needs one X and an arra...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Combine rows and average contents in table
% smoosh edges of disjoint regions to midpoints between... edges=[0.085 0.125; 0.17 0.23; 0.27 0.45; 0.6 0.9]; e=edges.'; e=e(...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Extracting single lines of text from a .txt file
In general, unless the file(s) are very large, it's more efficient to just read the whole file and then locate the wanted data i...

plus de 5 ans il y a | 0

Réponse apportée
compare two columns and their corresponding values from two different excel files
>> data1=readtable('data.xlsx');data2=readtable('Data2.xlsx'); >> setdiff(data1,data2,'rows') ans = 3×2 table count...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Why does dir command find files not following pattern in Windows?
That's the behavior of the OS dir command under Windows; '*' matches anything including nothing. Unfortunately, in typical MS s...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Graph plot with given range
You didn't allocate for each element of the output arrays but computed each point one-at-a-time by using an unneeded for...end l...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
combine 2 plot with different length
plot(x1,y1) hold on plot(x2,y2) or plot(x1,y1,x2,y2)

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Split a vector where NaN appears
>> x=randn(10,1);x([4 7])=nan x = 0.5080 0.2820 0.0335 NaN 1.1275 0.3502 NaN 0.02...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to make a script so I can choose a file from folders
While it's only documented by a very terse example, the builtin dir function will recurse directories if the search pattern cont...

plus de 5 ans il y a | 0

Réponse apportée
Get a subset of columns from a timeseries object as a timeseries
plot(u.Time,u.Data(:,1)) "But isn't there a simpler way similar to how I would plot a timeseries with only one variable?" Once...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
how to split a table to multiple table?
>> CT=reshape(CT,4,4,[]) CT(:,:,1) = 196 296 305 305 317 291 234 196 246 229 313 313 333 17...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
extraction of numeric data with presence of text data
fid=fopen('abc.txt','r'); abc=textscan(fid,'%s',inf,'Delimiter','\n','HeaderLines',2,'commentstyle','1','texttype','string'); ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to read .txt separate by - and in dms format
>> fmt='%f-%f-%fN %f-%f-%fW %f'; >> data=cell2mat(textscan(fid,fmt,'CollectOutput',1,'HeaderLines',1)) data = 46.00 ...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
using findstr to find what you are looking for
Looks like hard way to go at it to me...I'd just download the data to local file and snarf it up ... eopdata = urlread('https:/...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
I get date info when plot a Datetime in x-axis.
Another case of TMW being too aggressive in hiding things from the end user inside graphics objects -- the year/date 'SecondaryL...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Extract a Column from a large csv file
data=readmatrix('forward_turn_and_back.csv','range','AD:AD','NumHeaderLines',N); You'll have to set N for the number of headerl...

plus de 5 ans il y a | 0

Réponse apportée
how to increase the decimal place and it must be side to side as below
fmt=['%0.4f%+0.4fi\t%0.4f%+0.4fi\n']; >> for i=1:size(approx,2) fprintf(fmt,real(approx(i)),imag(approx(i)),real(exact(...

plus de 5 ans il y a | 0

Réponse apportée
Compare two list of strings line by line for a match and summarize results.
Don't need to explicitly loop -- MATLAB has functions builtin to do that for you. readin=lower(string(textread('readin.csv','%s...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Compare average monthly stock return data
See the optional 'nanflag' argument to mean-- M = mean(___,nanflag) specifies whether to include or omit NaN values from the ca...

plus de 5 ans il y a | 0

Réponse apportée
Fill in array with different lengths of variables at different locations
The trick for stuff like this is to "grow" from the back to the front -- so the indices you haven't gotten to yet don't change b...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to plot discrete data in a stackedplot
There's a 'PlotType' property in the stackedplot object that has the option for 'stairs' -- none of the previous gyrations are n...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
How do I compare two graphs for X value at a specific point?
Well, as Star Strider says, the disparity in orders of magnitude between the two makes one truly wonder just how they're suppose...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Appdesigner: Writing Data To Excel
writetable returns no arguments and needs the data to output as an argument -- read the doc first... % Button pushed function: ...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Combining chart for comparison got error
h1.Children.Children returns a comma-separated list-- >> h1.Children.Children ans = 0×0 empty GraphicsPlaceholder array. ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Writing x values with subscript in the graph
hAx=gca; % save the axes handle -- may want later hAx.TickLabelInterpreter='tex'; % set tick lab...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to extract a column from a matrix by searching
vWant=11; vecRes=matrix_test(:,matrix_test(1,:)==vWant);

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to plot discrete data in a stackedplot
You can get creative and use stackedplot to create the axes for you, and then go "handle-diving" to find and modify the content ...

plus de 5 ans il y a | 1

Réponse apportée
Log return of a timetable
To put the computed return at the end time point of the interval, augment the diff vector with a missing-value indicator--- dat...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Merge dataset with different lengths
TT = synchronize(DAX,SP500,'intersection'); TT = synchronize(TT,NIKKEI,'intersection'); where DAX, SP500 and NIKKEI are the th...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How and where to place the legend box in a "tiledlayout"?
Well, you have to get creative -- the following experiment t=tiledlayout(2,2); % create a 2x2 layout nexttile, pl...

plus de 5 ans il y a | 1

Charger plus