回答済み
3-d plot generated from simulations
n = 1000; iMax = 50; jMax = 50; myArray = zeros(iMax, jMax); for iIdx = 1:iMax for jIdx = 1:jMax myArray(iIdx,j...

5年以上 前 | 0

| 採用済み

回答済み
text box for 'xline' function?
There are a few ways to do this. With annotation, it's easy to combine an arrow with a text box. The downside is you have to u...

5年以上 前 | 0

| 採用済み

回答済み
How to perform a calculation only when a input value is positive
It is not clear what you mean by "input value", but assuming you do know, then... for chi_e > 0.0 if input_value > 0 ...

5年以上 前 | 0

回答済み
How to change line width of matlab legend without changing the other legend options?
I don't see the problem you note, re a change in the number of columns in the legend. The error occurs because you are trying t...

5年以上 前 | 2

回答済み
Excel sheet mean of the row and plot the graph
T = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/635705/Kendri.xlsx'); x = T{:,1}; % x-axis cond...

5年以上 前 | 1

| 採用済み

回答済み
how to plot string data on x axes
% test data cases = randi(100, 1, 5); % number of covid cases names = { 'abc' 'def' 'ghi' 'jkl' 'mno' }; % country names % ...

5年以上 前 | 0

| 採用済み

回答済み
definitions in a script must appear at the end of the file.
Functions defined in a script (such as imeme2022 in your script) must be positioned at the end of the script. The error message...

5年以上 前 | 0

回答済み
Make several tables from one table
Try this... % table containing your data T = readtable('yourdata.xlxs'); % vectors of indices for ON/OFF rows idxFirst = f...

5年以上 前 | 1

| 採用済み

回答済み
i need to make space between two bar plot in x axis
With the labels you are using, a multi-line tick label might look better: n = [81.2858,82.6818,82.0401,82.0560]; bar(diag(n), ...

5年以上 前 | 0

| 採用済み

回答済み
Matlab bouncing ball in box
There are alternatives to animatedline. You can create a ball using rectangle with the curvature property set to 1. But, given...

5年以上 前 | 0

回答済み
Separating repeated values in an excel column.
If the number of readings varies, as you say, from 8 to 12, then... T = readtable('yourdata.xlsx'); names = unique(T{:,1}); j...

5年以上 前 | 0

回答済み
Separating repeated values in an excel column.
When you say "plot all the 12 readings", I assume there are exactly 12 readings per name. In this case... T = readtable('yourd...

5年以上 前 | 0

回答済み
Creating new table from another table
You have several problems in your code. The assumtion in your question is that you want to create a new table (newtable) contai...

5年以上 前 | 1

| 採用済み

回答済み
How do I make a rectangle that is in maximized state in MATLAB ?
The rectangle function does not draw a rectangle directly on your system's display. It creates a rectangle in the current axes ...

5年以上 前 | 0

回答済み
How to fit an exponential curve with known error bars
The plot looks curved to me. The error bars in your chart appear as horizontal lines because they are really small. Here's a t...

5年以上 前 | 0

回答済み
Writing a string that fills to the left
You need to include a field width in the format specifier. An example for integers: fprintf(fid, 'Item one: %8d %8d %8d', A, ...

5年以上 前 | 1

| 採用済み

回答済み
How can I measure the area covered by a Bar Chart Plot?
Your question is a bit of a moving target. The question title refers to a bar plot. The question text refers to a histogram wi...

5年以上 前 | 0

| 採用済み

回答済み
How to use "while loop" in this case?
You've got a for-loop inside a while-loop. This is likely unnescessary. Here's approximately what you need... sampleSize = 18...

5年以上 前 | 0

回答済み
t test on each grid point between two 3D matrices (3rd dimension)
You are using the wrong form of ttest2. If you want to get the stats structure, change [h,p,stats] = ttest2(group1,group2, 'di...

5年以上 前 | 0

| 採用済み

回答済み
How to re-scale the colorbar without affecting the graph?
Just set the Limits property of the colorbar. Here's an example for bar charts ... tiledlayout('flow'); nexttile; x = 1:5;...

5年以上 前 | 1

| 採用済み

回答済み
How to get origin vector form indexd matrix
idx2 = [1 3 4 2 5 6]; C = B(idx2)

5年以上 前 | 0

回答済み
Sawtooth diagram for automotive use
Here's some code to create a sawtooth pattern: samples = 100; % per cycle cycles = 5; peak = 15; y = linspace(peak,0,samp...

5年以上 前 | 0

回答済み
Norm and mean of a time series
The first error is in the 3rd line. norm is a built-in MATLAB function and requires at least one input argument. The second "e...

5年以上 前 | 1

| 採用済み

回答済み
How to remove rows in Table
You want to read 10 columns of data in rows 650 to 1200. There is no need to read the entire file. Try this... inFile = 'your...

5年以上 前 | 1

| 採用済み

回答済み
How to add even numbers in matlab
x = 100; % the highest number for the sum operation sum(2:2:x)

5年以上 前 | 0

| 採用済み

回答済み
How do i use least square method to fit a nonlinear curve to data set below ?
This solution uses polyfit and a log transformation, converting the power-law into a linear equation. There might by an easier ...

5年以上 前 | 0

| 採用済み

回答済み
How do i use least square method to fit a nonlinear curve to data set below ?
Which non-linear curve? Here are a few options for you, for polynomials with orders 1 through 6: p = [40 50 60 80 100]; r = [...

5年以上 前 | 0

回答済み
Counting years from a date time variable
This seems to achieve what you are after... % test data d = datetime(randi([1962 2020],1,50), randi(12,1,50), randi(28,1,50));...

5年以上 前 | 0

| 採用済み

回答済み
Brace indexing is not supported for variables of this type.
It's hard to tell because you haven't stated what Csurf contains. Yes, it's a cell matrix, but a cell matrix containing what? ...

5年以上 前 | 1

| 採用済み

回答済み
How to show values on horizontal stacked bar graph bar in Matlab app designer?
This question is answer here

5年以上 前 | 0

| 採用済み

さらに読み込む