回答済み
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...

5年以上 前 | 0

| 採用済み

回答済み
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...

5年以上 前 | 0

回答済み
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...

5年以上 前 | 2

| 採用済み

回答済み
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 ...

5年以上 前 | 0

| 採用済み

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

5年以上 前 | 1

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

5年以上 前 | 0

回答済み
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...

5年以上 前 | 1

| 採用済み

回答済み
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...

5年以上 前 | 0

回答済み
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); ...

5年以上 前 | 0

| 採用済み

回答済み
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...

5年以上 前 | 0

回答済み
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 ...

5年以上 前 | 2

| 採用済み

回答済み
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...

5年以上 前 | 1

回答済み
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); ...

5年以上 前 | 0

| 採用済み

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

5年以上 前 | 0

回答済み
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 ...

5年以上 前 | 0

| 採用済み

回答済み
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...

5年以上 前 | 0

回答済み
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...

5年以上 前 | 0

回答済み
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...

5年以上 前 | 0

回答済み
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...

5年以上 前 | 0

| 採用済み

回答済み
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...

5年以上 前 | 0

| 採用済み

回答済み
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 ...

5年以上 前 | 2

回答済み
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...

5年以上 前 | 0

回答済み
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...

5年以上 前 | 0

| 採用済み

回答済み
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...

5年以上 前 | 0

| 採用済み

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

5年以上 前 | 0

回答済み
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...

5年以上 前 | 2

| 採用済み

回答済み
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...

5年以上 前 | 0

回答済み
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:...

5年以上 前 | 0

| 採用済み

回答済み
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...

5年以上 前 | 0

回答済み
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 ...

5年以上 前 | 0

| 採用済み

さらに読み込む