Risposto
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...

quasi 5 anni fa | 0

| accettato

Risposto
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...

quasi 5 anni fa | 0

Risposto
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...

quasi 5 anni fa | 2

| accettato

Risposto
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 ...

quasi 5 anni fa | 0

| accettato

Risposto
Plotting line of regression analysis
Just add lsline after scatter ... LR1=linear_regression (new_exp_wear_data,new_caliberated_pred_data ); figure(200); scatter ...

quasi 5 anni fa | 1

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

quasi 5 anni fa | 0

Risposto
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...

quasi 5 anni fa | 1

| accettato

Risposto
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...

quasi 5 anni fa | 0

Risposto
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); ...

quasi 5 anni fa | 0

| accettato

Risposto
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...

quasi 5 anni fa | 0

Risposto
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 ...

quasi 5 anni fa | 2

| accettato

Risposto
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...

quasi 5 anni fa | 1

Risposto
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); ...

quasi 5 anni fa | 0

| accettato

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

quasi 5 anni fa | 0

Risposto
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 ...

quasi 5 anni fa | 0

| accettato

Risposto
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...

quasi 5 anni fa | 0

Risposto
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...

quasi 5 anni fa | 0

Risposto
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...

quasi 5 anni fa | 0

Risposto
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...

quasi 5 anni fa | 0

| accettato

Risposto
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...

quasi 5 anni fa | 0

| accettato

Risposto
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 ...

quasi 5 anni fa | 2

Risposto
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...

quasi 5 anni fa | 0

Risposto
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...

quasi 5 anni fa | 0

| accettato

Risposto
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...

quasi 5 anni fa | 0

| accettato

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

quasi 5 anni fa | 0

Risposto
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...

quasi 5 anni fa | 2

| accettato

Risposto
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...

quasi 5 anni fa | 0

Risposto
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:...

quasi 5 anni fa | 0

| accettato

Risposto
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...

quasi 5 anni fa | 0

Risposto
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 ...

quasi 5 anni fa | 0

| accettato

Carica altro