Réponse apportée
How to get such legend in MATLAB?
Use the 'DisplayName' property for the desired line types to be plotted -- you'll need two lines drawn with just the solid line ...

presque 5 ans il y a | 0

Réponse apportée
How to sort the rows of a cell?
s=sort([x{:}]); % where x is the cell array

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Why is signal amplitude so low after applying FFT?
Several issues here -- the first being the RMS value masks the signal amplitude with the DC value unless you first detrend the t...

presque 5 ans il y a | 0

Réponse apportée
Bar chart samples are shuffled
As @Star Strider says, categorical variables are not ordinal by default and are valued by lexical sorting. To fix X = {'Pristi...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
Selecting random cells in a matrix without repetition
N2Choose=20; R=M(randperm(numel(M),N2Choose)); ERRATUM Stupid auto-complete put the silly parens in instead of letting me whe...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How do i add a for loop if command to a pre existing table
Begin learning to use MATLAB vector operations from the git-go -- naming variables sequentially with a numeric suffix is almost ...

presque 5 ans il y a | 1

Réponse apportée
Feeding index returned by find in another matrix
>> a=[NaN,NaN; NaN,2; 11,NaN]; >> a a = NaN NaN NaN 2.00 11.00 ...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Insert "epsilon dot" in a figure title with tex interpreter (not latex)
No; the MATLAB implementation of TeX uses the defined special characters and the limited modifiers of ^ and _ for super/subscrip...

presque 5 ans il y a | 0

Réponse apportée
Put axis label in their respective middle (3D plot)
... mesh(x,y,z); hXL=xlabel('time[sec]'); % default label, save handle hXL.Position=hXL.Position+[0.5 0 0...

presque 5 ans il y a | 0

| A accepté

Question


Setting focus in AppDesigner
I'm setting a TextArea object to be editable with a menu selection to allow a field to be updated by the user. The callaback to...

presque 5 ans il y a | 2 réponses | 1

2

réponses

Réponse apportée
Why is it not possible to increase the excel readtable range?
The error message doesn't have anything to do with the Q? that was posed as written and looked at above, however...it's got to ...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Select rows of timetable based on Month range
To use the numeric months, wintertime = [1:3 11:12]; % [start, end] of desired months TTwinter = TT(ismember(month(TT.Tim...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Get maximum values across a cell array with multiple indexing.
Use grouping variables -- there's still a looping construct inside, of course, but you don't have to write it explicitly... >> ...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
strsplit: the deliminator on both sides was still kept but not removed
WAD (Working As Designed) >> a = strsplit(' aa bb cc ',' ') a = 1×5 cell array {0×0 char} {'aa'} {'bb'} ...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
Loop until Matrix value exceeds value
% pseudo code, salt to suit... A=[...]; % initialize A here maxB=60; % the test value for x...

presque 5 ans il y a | 0

Réponse apportée
Create table of means from multiple tables
Simplest probably would be to convert to a 3D array and then use mean() along the third dimension.... tMeans=mean(cat(3,table2a...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How to change font type of bar plot labels?
... hAx=gca; hAx.TickLabelInterpreter='latex'; xticks(1:numel(str)) xticklabels(str) hAx.FontSize=20; ...

presque 5 ans il y a | 0

Réponse apportée
How to write a specific number via a loop
Other than there aren't 23 lines in the code shown :), the problem is actually in the line distances = (deg2km(distance(lat1(z)...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How to combine table output in one table?
Hr=2; u=11.5; Qm=7973504; X=[10:20]; sigma_y=0.22*X./sqrt(1+0.0001*X); sigma_z=0.20*X; Ground_Level_Conc=(Qm./(3.142*sigma...

presque 5 ans il y a | 0

Réponse apportée
Searching for a file when the filename is always changing
"the filename will always be 'location 1 (random letters) \ test (random letters)'." rootdir='C:\Users\tathuen\Desktop\Data\'; ...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
how can I read spreadsheet file which is not generated by excel in Matlab
I thought something like this might be the case -- it's a text, delimited file named as ".xls" -- Excel does have internal smart...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Bar plot with two axis no plotting as grouped
They're not stacked, they're just plotted on top of each other because there's only one series on each call to bar(); hence ther...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
how to confusion matrix convert to heatmap style?
m=[923 4 21 8 4 1 5 5 23 6 5 972 2 0 0 0 0 1 5 15 ...

presque 5 ans il y a | 2

| A accepté

Réponse apportée
How can I break the text in two or three lines of the x tick label on a box plot?
Unfortunately, the tick label interpreter won't pass a string with embedded \n on; it instead splits the string into two. I don...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
Why do I receive Not enough input arguments?
The error about not enough input arguments will come from how you called the function -- which you didn't show us. Whatever tha...

presque 5 ans il y a | 0

Réponse apportée
How do you change the color of legend lines? How do you make x axis go from 0 to 2pi?
Define the x vector to plot against; the one numeric argument form of plot, as documented, plots against the ordinal position, o...

presque 5 ans il y a | 0

Question


Strange Environment Behavior Windows 10 and MATLAB
I had been using if strcmpi(getenv('userdomain'),'SPECIFIC_STRING') to identify which system was running on in a compiled a...

presque 5 ans il y a | 1 réponse | 0

0

réponse

Réponse apportée
How to move heatmap's Ylabel to colorbar's rightside
OK, one can take the last idea above and make things a little easier -- you don't actually have to have the two panels, but just...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
All -9999 in a table to NaN
isBad=(T{:,:)==-5555); % logical array across table T T{:,:)(isBad)=nan; % assign NaN to those locations Use...

presque 5 ans il y a | 0

Réponse apportée
How to find the first date of each month in a datetime array?
firstDate=groupsummary(d,findgroups(year(d),month(d)),@min); gives >> firstDate firstDate = 11×1 datetime array 14-J...

presque 5 ans il y a | 0

| A accepté

Charger plus