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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 2

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

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
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 % ...

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
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), ...

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 1

| akzeptiert

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

Beantwortet
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, ...

fast 5 Jahre vor | 1

| akzeptiert

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
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;...

fast 5 Jahre vor | 1

| akzeptiert

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 1

| akzeptiert

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

fast 5 Jahre vor | 1

| akzeptiert

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
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 = [...

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
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? ...

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
How to show values on horizontal stacked bar graph bar in Matlab app designer?
This question is answer here

fast 5 Jahre vor | 0

| akzeptiert

Mehr laden