Réponse apportée
How to get the x axis and y axis to start at 0 when adding regression line in Figure window
I'm assuming you don't want to loose the points with y < 0. Something like this should work... % test data x = 1:100; y = li...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Finding value with row and column headings
Assuming your data are in a matrix named data, try this... [row, col] = find(data > 0.95); The variables row and col identif...

environ 5 ans il y a | 0

Réponse apportée
How to change number precision with writestruct
s=struct('pi', num2str(pi, 15)); % pi with 15 significant figures writestruct(s, 'pi.xml'); type pi.xml Output: <?xml ve...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
Adding a column of the same character name for all the rows in a table
From my understanding of the question, this is simply a matter of making the necessary assignment to r1.Time or r2.Time. Do so ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Plotting line of regression analysis
Just add lsline after scatter ... LR1=linear_regression (new_exp_wear_data,new_caliberated_pred_data ); figure(200); scatter ...

plus de 5 ans il y a | 1

Réponse apportée
Creating grouped or stacked bar plot?
data = rand(2,10)*100; b = bar(data, 'stacked', 'edgecolor', 'flat'); labels = { 'Canada', 'USA', 'etc', 'etc', 'etc', 'etc'...

plus de 5 ans il y a | 0

Réponse apportée
how can i create a horizontal bar plot and label in each stack
a1=[51.2, 1.6, 8.7, 9.9, 1.1, 26.0, 1.5, 0.0; 25.5, 0.0, 0.3, 7.9, 0.0, 58.6, 5.4, 2.3]; b = barh(a1,'stacked', 'edgecolor...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
create many bar plots with loop process
A = rand(20,50); B = rand(20,50); x = 1:50; for i=1:size(A,1) bar(x,[A(i,:); B(i,:)]); filename = sprintf('pl...

plus de 5 ans il y a | 0

Réponse apportée
Read in only certain numbers from a txt file.
This creates a cell array of the 11-digit numbers in your file... fileName = 'Example.txt'; n = []; fid = fopen(fileName); ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to get position of single box in grouped box chart on x-axis?
The use of grouped data changes the XData type to categorical for the BoxChart. Plus, there doesn't seem to be any BoxChart pro...

plus de 5 ans il y a | 0

Réponse apportée
How to create a square wave signal
Here's a brute-force solution. It's a bit odd, but it does create a square wave according to your specs (with one extra sample ...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
Duplicate table variable name: 'VarName2'.
Here are three solutions. They all give nine columns, one for each source, as per your question. The first table (dataNew1) is...

plus de 5 ans il y a | 1

Réponse apportée
where to find z score and df in multiple comparison ?
The degrees of freedom is n -1, when n is the number of columns in the data set: [p,table,stats] = kruskalwallis(data,groups); ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
GRAM-SCHMIDT FUNCTION IS NOT GIVING CORRECT VALUES
It would be helpful if you posted your code as MATLAB code, not question text.

plus de 5 ans il y a | 0

Réponse apportée
How to save part of the data in text file?
If you want to save the data being plotted on the last iteration (i = 3), try adding one line after your loop: for i = 1:3 ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Reading particular column in one excel file and write it in new excel file
T = readmatrix('inFile.xlsx'); writematrix(T(:,n), 'outFile.xlsx'); % n is the number of the column you want to read and then w...

plus de 5 ans il y a | 0

Réponse apportée
How well can I predict task performance from predictor variables?
If you want a prediction equation expressing RT as a linear function of "amplitude of EEG signal", "speed of saccade", and "fMRI...

plus de 5 ans il y a | 0

Réponse apportée
specifying only few tick labels
Frist, decide on how many ticks labels you want, Then, create a cell array with the labels. Set the axis ticks and tick label...

plus de 5 ans il y a | 0

Réponse apportée
3D scatterplot with marker color as a function of fourth variable
Assuming you want a separate color for each point... x = rand(1,100); y = rand(1,100); z = rand(1,100); a = 1:100; scatte...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to shade plot with 0, 1 valued signal
Let me add this as a possible solution. The trick, as always, is to get the right data and organize the data in some convenient...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to plot a different colored area of negative and positive elements in an array?
Fang: Did you find a good solution? I've been working on this issue recently. Here's an approach that works well. The trick ...

plus de 5 ans il y a | 2

Réponse apportée
Changing bin edges on polar histogram
I suggest you work with bin edges in addition to the number of bins. Below are two examples. On the right, the bins are wind d...

plus de 5 ans il y a | 0

Réponse apportée
Make polar histogram bins on cardinal axes
Consider specifying bin edges rather than the number of bins. If you want four bins centered at 0, 90, 180, and 270, then you n...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Strange behaviour of polar histogram
Consider working with bin edges and set things up for the number of desired bins between 0 and 360 degrees: data = [0, 0, 0, 90...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
LaTex interpreter in Heatmap ax-label
h = heatmap(M,M,Err); h.XLabel = 'M{_1}'; h.YLabel = 'M{_2}';

plus de 5 ans il y a | 0

Réponse apportée
How can I get the Secant method to repeat ?
Your code is rather dense. However, I did observe the looping in your code. And... (drum roll please) ... You've got a bug i...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
Boxplot and histogram in one plot
This solution uses tiledlayout and boxchart, but you can adjust to use subplot and boxplot if you are running an older version o...

plus de 5 ans il y a | 0

Réponse apportée
Conversion operators error!
You don't need compose because you aren't formatting numeric values into the labels. Just specifiy your labels in a cell array:...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Why do i get NaN?
It's hard to say without being able to run your code, but it seems to me that anfang in avgT(idx1) = mean(Cell{idx1}(anfang:en...

plus de 5 ans il y a | 0

Réponse apportée
Plot data from a table that has years in the rows and months in the columns
Here's an alternative approach that gives a flattened 2D view plus red and blue fills for + and - portions of the graph, as per ...

plus de 5 ans il y a | 0

| A accepté

Charger plus