Réponse apportée
How to add hat symbol to "xtick"
Have to escape LaTex sequences with "$$" before and after...try something like hAx=axes; xlim([1 3]); xticks([1:3]) % a samp...

plus de 6 ans il y a | 2

| A accepté

Réponse apportée
How to plot a polynomial function, having the ordinate coordinates symmetrical about the abscissa (horizontal line)
Well, it's not too hard to get reasonably close...you don't have enough points on yours for the smooth line...the following code...

plus de 6 ans il y a | 0

Réponse apportée
find minimum value of a two-variable equation on an interval.
"...is there anyway I can delet[e] the dot but the equation can still work?" Ah! Indeed I didn't follow along the nub of the q...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Hiding Plot Elements makes those elements appearing in the legend and the legend itself a much lighter shade than it should be. How to fix this?
OK, wasn't too hard to take yours and make an example... figure(1) colormap jet hAx(1) = subplot(5,5,[1,2,6,7]); yyaxis le...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Write multiple vectors into .dat file
Simplest, presuming they're the same length would be to write as 2D array. I'd write as column instead of row.. writematrix([x...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Extract numbers from lines in a txt file. Onset times from experimental data.
Carrying on from the above that just diddled with the file format to be able to get the data; the following seems to work: file...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
log-log plot explained
You have created such...what's the problem? Probably the issue is that your data don't cover a sufficient range in either x or ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Extract numbers from lines in a txt file. Onset times from experimental data.
The problem is the file contains double-byte characters and ML isn't interpreting them ... >> txt=importdata('Imagine_simple-1-...

plus de 6 ans il y a | 0

Réponse apportée
Create a logistical variable based on time range
readtable is a convenient byway on the way to a timetable which will undoubtedly be your friend... tt=readtable('Forum_aq_data....

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Plotting an array of vectors
Your data are nothing at all like that of the other figures; hence it's not surprising they don't plot similar-looking graphs. ...

plus de 6 ans il y a | 0

Réponse apportée
Sum across columns with shift
May be some other more clever indexing, but the "deadahead" thing that comes to mind if I understand the desire >> a=1:18;a=res...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Scatter Plot with different "markers" and "data labels"
Adam posted first but will add slightly different way to get to same place (sans some of the finishing niceties...) Why scatter...

plus de 6 ans il y a | 1

Réponse apportée
How to reshape an array in a specific manner
>> reshape(a,3,[]).' ans = 1 2 3 1 2 3 1 2 3 1 2 3 >>

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How can I get information that a 'uisave' command was aborted?
No can do. Less than primo "Quality of Implemenation" that TMW didn't have an optional return value from uisave >> fn=uisave('...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to sort a vector according to another vector?
R=['a':'d'].'; % So can identify elements of R % the engine [~,ix]=sort(ranks); % the result... >> R(ix) ans = 4×1 char...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Question on why tilde cannot return the opposite statement result
Q4_ans_test2 = mean( adultdata.hours_per_week(adultdata.age>30 & ~(adultdata.age>50))); Without the parentheses, the ~operator ...

plus de 6 ans il y a | 1

Réponse apportée
Fractions as array indices in for loop
Short answer? "Because!" TMW hath so decreed. I'm sure it's mostly performance related as well as ease of code development an...

plus de 6 ans il y a | 0

Réponse apportée
row from matrix by argument
m=randi(200,4) % sample data m = 125 95 46 63 118 47 35 185 42 169 46 87 ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Counts the number of times the signal crosses zero
Use zcd = dsp.ZeroCrossingDetector; to create the object per the documentation. Then you pass that object the data... numZero...

plus de 6 ans il y a | 0

Réponse apportée
Looping through different sheets/sheet names in each loop to access data
You've embedded the text string '({SheetNames}.(iSheetData}' in the readtable call instead of using the variable Sheetnames. Ju...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Deleting Characters from String and Repeating
Well, I don't know how you get L=96 from 50 bytes and I don't think it's likely what you're really going to need, but.. Given t...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
plot 3D minimum value of a function
Don't think it could be any easier...look at the following from one of the surf examples: [X,Y,Z] = peaks(25); CO(:,:,1) = zer...

plus de 6 ans il y a | 1

Réponse apportée
Plot graph with different markers
See <Marker in Graphplot properties>. Pass an index array to the position of the desired marker type as the 'Marker' property. ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Concatenating strings w/ character with while loops
>> myname = 'Nate Johnson'; >> split(myname) ans = 2×1 cell array {'Nate' } {'Johnson'} >> presuming the nex...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to find the name of the first filed of a struct?
If the struct variable is s, then name=fieldnames(s); name=name(1); No way to write the second-level addressing w/o the inter...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Replace NaN with Blanks
Can't be done--a double array has to be regular in both dimension; can't have holes. Only possibility is to convert to a cell a...

plus de 6 ans il y a | 0

Réponse apportée
fprintf and fscanf same format fail to read file. appreciate help
MATLAB is NOT Fortran. As Stephen notes above and is documented, fscanf returns a single array of a given class; if there are a...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
fprintf and fscanf same format fail to read file. appreciate help
fprintf(fid,'%5i%5i %17.4E%17.4E\r\n', A); will write A in column-major order, not row-major as you're trying to read it in l...

plus de 6 ans il y a | 0

Réponse apportée
How to combine datetime and duration columns to form 1 new datetime column in table
Add the duration to the date... Starting with: t = 3×3 table Date Time Data ___________ ____...

plus de 6 ans il y a | 5

Charger plus