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
-
Select every other element of a vector
36176 Solvers
-
1344 Solvers
-
5610 Solvers
-
There are 10 types of people in the world
1281 Solvers
-
176 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