Answered
Change the color of each bar in the Bar graph of 3 arrays
Try this, but with your own colors in clr: clr = rand(12,3); encomb=[4 3 2 1;5 4 3 2; 6 5 4 3 ]; figure(12) hold on bb=bar(...

5 years ago | 1

| accepted

Answered
How do i put this in Matlab?
exp(-500*abs(t))

5 years ago | 0

Answered
How to display a list from excel using different values
Kyle's value ranges are not quartiles. Here's what I put together, starting with Walter's code to read the table and add the U...

5 years ago | 0

| accepted

Answered
How can I load this file?
How about this: T = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/593980/casestudy.csv', 'ReadVari...

5 years ago | 0

| accepted

Answered
Knowing the relative position of a given point compared to a straight line on the (x,y) plane
Here goes... givenX = [23 66]; givenY = [55 15]; m = (givenY(2) - givenY(1)) / (givenX(2) - givenX(1)); b = givenY(1) - m ...

5 years ago | 1

| accepted

Answered
Create an "equispaced" vector that includes a number of given points
result = unique([v a])

5 years ago | 0

| accepted

Answered
Drop column of values using if function
Set up a for-loop for your code, something like this. time = MA.data(:,2); for i=3:30 ma_flexion = MA.data(:,i); m...

5 years ago | 0

Answered
plot/stackedplot excel matlab
Try changing A_plot = A(:,1); B_plot = B(:,1); to A_plot = table2array(A(:,1)); B_plot = table2array(B(:,1));

5 years ago | 0

| accepted

Answered
every 4 rows of a table of n rows transposed into 4 new columns
Assuming (i) you are talking about a data matrix or a table data type converted to such and (ii) by "every 4 rows" you mean "eve...

5 years ago | 0

Answered
How to display the actual values of my percentages on a pie chart
Is the central issue combining a text label with the percentage? If so, perhaps this will work: X = [34 19 12 2 3 5]; Labels ...

5 years ago | 3

| accepted

Answered
Specific row and column addition for a NxM matrix
% assume the data are in z outLogical = z > 3.4084 & z < 2.8216; inLogical = z < 10.000 & z > 3.6874; sumOuter = sum(z(outLog...

5 years ago | 0

Answered
finding big letters and skip a line
There's probably a more elegant solution, but here's a first quick shot at this: s="In the golden lightning Of the sunken sun,O...

5 years ago | 0

Question


Can boxchart create a box plot with grid lines behind the boxes?
I'm trying to use boxchart create a box plot with y-axis grid lines. Obviously, I want the grid lines positioned behind the box...

5 years ago | 0 answers | 0

0

answers

Answered
How to change the color of individual bars in a bar chart?
Here's a simple solution. Notably, all the bar colors are set in a single statement (provided the new colors are pre-defined in ...

5 years ago | 5

Answered
Edit the limits in least squares line.
As noted, lsline isn't very useful beyond its default behaviour. To constrain the limits of the regression line, a simple option...

5 years ago | 0

Answered
How do I create a multi-line tick label for a figure using MATLAB 7.10 (R2010a)?
I played with the solutions above, but decided to take a DIY approach: x = 1:4; y = rand(1,4); plot(x,y); ax = gca; ax.XT...

5 years ago | 6

Answered
Is it possible to make figure caption?
To elaborated on Image Analyst's "stitch some blank lines", here's what worked for me. For the x-axis label, use something like...

5 years ago | 0

Answered
accuracy of coefficients using fit with power1
Sorry, but I haven't a clue how to upload an Excel spreadsheet into this question. But, all you need to do is put the following...

6 years ago | 0

Question


accuracy of coefficients using fit with power1
I'm seeing a discrepency between the coefficients obtained via MATLAB's fit function using a fitType of power1 and the coefficie...

6 years ago | 3 answers | 0

3

answers