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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 0

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

casi 5 años hace | 2

| aceptada

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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 1

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

casi 5 años hace | 0

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

casi 5 años hace | 1

| aceptada

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

casi 5 años hace | 0

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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 0

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

casi 5 años hace | 2

| aceptada

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

casi 5 años hace | 1

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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 0

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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 0

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

casi 5 años hace | 0

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

casi 5 años hace | 0

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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 2

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

casi 5 años hace | 0

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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 0

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

casi 5 años hace | 2

| aceptada

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

casi 5 años hace | 0

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

casi 5 años hace | 0

| aceptada

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

casi 5 años hace | 0

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

casi 5 años hace | 0

| aceptada

Cargar más