Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Bar Grpah Width Change and Hight Marking

Subject: Bar Grpah Width Change and Hight Marking

From: Shantharam

Date: 12 May, 2012 05:46:31

Message: 1 of 1

I hav two matrices

ampbar = [37.2629558063202 68.7553958946060 120.914024962793
49.5956794318233 70.7062774133122 95.0302294527519
43.0194050310255 72.0721373046859 136.039202119673
40.4698834748093 80.3243346706655 133.505451938934
2.57994129752584 8.87564303536665 15.3736479059295
1.86551231186421 4.47218920854374 8.20418769758095
0 1.96610183826888 4.66442085244451
0.383483696964955 1.41878317244509 3.05451307281037
0 0.919213277283030 2.60793198953247
0 0 0
0 0.715597877450447 1.78067523375543
0 0 0
0 0.688455693885009 2.09052267917299
0 1.04573464140854 3.14853491923985
0 1.82728290654753 5.39645990895832
0 3.75395943485136 16.7637147586992
0 5.61443594153738 17.3136664339142
0 3.70841465508077 9.87034422871424
0 0 0
0 3.36385522502348 8.06131341486170
0 0 0
0 1.73868061745476 7.76110262909004
0 1.19980343669922 4.52699165129957
0 0.820701460164771 2.38352156245969
0 0 0
0 0.782401600535494 2.30616772354698
0 1.18169548249241 3.65634532817026
0 1.51906421813388 8.39206064262990] whose size is 28x3

frnorm = [ 0.915556371562970 1 1.08858174472634
0.915556371562970 1 1.08858174472634
0.915556371562970 1 1.08858174472634
0.915556371562970 1 1.08858174472634
0.915556371562970 1 1.08858174472634
0.915556371562970 1 1.08858174472634
0 1 1.11405387605891
0.882852123595518 1 1.09008670481855
0 1 1.11252860911662
NaN NaN NaN
0 1 1.12626122207594
NaN NaN NaN
0 1 1.11666943897659
0 1 1.14265242813113
0 1 1.12713496742502
0 1 1.18551028095111
0 1 1.12915054463733
0 1 1.21989547918001
NaN NaN NaN
0 1 1.18930633946879
NaN NaN NaN
0 1 1.20382826998982
0 1 1.18834384958276
0 1 1.19282222974861
NaN NaN NaN
0 1 1.12170057013708
0 1 1.15712239276610
0 1 1.15724062007136] whose size is 28x3. Take 0 in place of NaN.



I want to plot a bar graph where each bar represents a row of matrix. The bar should be plotted in such a way that

along a single bar a row of ampbar represents min mean max values correspondingly.

Width of bar ranges from 1st element to 3rd element of a row in frnorm

For example first bar has a height of 3rd element in 1st row, also 2nd,1st element values should be on height of that single bar. If the middle of bar width represents 2nd element of first row of frnorm, the edges should represent 1st and 3rd elemnts.

Please tell me how to write the code.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us