Create a function that takes power outage data as an input and creates a histogram of the number of outages as a function of Region. Note that the Region column of the power outage table contains a cell array of character vectors.
Rotate the x-axis tick labels by 30 degrees and label the y-axis with "Number of Outages".
Your function should return the figure handle as output.
Solution Stats
Problem Comments
6 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers214
Suggested Problems
-
Project Euler: Problem 9, Pythagorean numbers
1385 Solvers
-
6254 Solvers
-
841 Solvers
-
2715 Solvers
-
Split Even Number Into Two Primes
211 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
The function is not executed for any of the tests.
Execute scratch pad:
T = readtable("outages.csv","TextType","string");
g__= plotOutages(T);
We must use the scratch pad, as said by David Hill, and return the histogram with gcf(). This should probably be added to the problem's description.
i am so confused, i dont think any of the test cases actually execute the function ?
@March 7th, the part of the test suite where the function is called is before the first test and so isn't visible.
Dear all
"assert" had been defined like below;
assert(isequal(g__.Children.Children.Type,'categoricalhistogram'))
If you want to pass the tests, you should define you function like below
wrong function:
function f = plotOutages(T)
end
Right function
function g__ = plotOutages(T)
end