version 2.4.0.9 (1.31 MB) by
Lateef Adewale Kareem

This function SFBM.m calculates and draw the shear force and bending moment diagrams.

**Editor's Note:** This file was selected as MATLAB Central Pick of the Week

This file explains how to use the SFBM.m code. as well as supporting

accessories. SFBM means Shear Force & Bending Moment.

This program calculates the shear force and bending moment profiles, draw

the free body, shear force and bending moment diagrams of the problem.

Under the free body diagram, the equations of each section is clearly

written with Latex

To use this program, you call the function placing the arguments in cells

with keywords at the beginning of each cell except for the first 2 arguments.

First Argument

The first argument is the name of the problem as a string e.g.: 'PROB 1'.

Second Argument

-Simply supported beam

The second argument is a row vector containing length of the beam and

location of the supports, for example, if the length of the beam is 20m and

has 2 supports, one at 3m and the other at 17m, the second argument will

thus be: [20, 3, 17]

-Cantilever

If the problem is a cantilever problem, then you have only one clamped

support, at the beginning or end of the beam. In such a case, the number is

second argument contains 2 elements instead of three. For instance, fir a

cantilever of length 20m, supported at the beginning, the second argument

would be [20,0], and if supported at the end, we have [20,20].

-Beam on the floor

Its possible to have a problem in which the body is lying on the floor

without any point support. In such scenario, the second argument will just

be the length of the beam

Third argument and on

From the third argument and onward, we use cells. The first element of the

cell contains a keyword describing what type of load is inside the argument.

The second element is the magnitude of the load while, the third element of

a cell argument is its location.

Keywords: Point Load = 'CF'

Moment = 'M'

Distributed Load = 'DF'

To add a downward point load of magnitude 5N at location 4m, the argument

would be {'CF',-5,4}. Note the negative sign. If the force is acting upward

the argument would be {'CF',5,4};

To add a clockwise moment of magnitude 10N-m at location 14m, the argument

would be {'M',-10,14}. Note the negative sign. If the moment is anticlockwise

the argument would be {'M',10,14};

To add distributed load we need to describe all of them with the minimum

number of point required to describe the profile with the highest

complexity. For example, a linear profile can be described as {'DF',[5,5],[2,10]}

meaning uniform force per unit length of 5N/m from point 2m to 10m. If the

values of the profile were given at 3 points, the code will automatically

assume it to be quadratic. If profile is uniform, the coefficient of the

second and first degrees would be zero.Hence describing the constant 5N/m

from 2m to 10m as {'DF',5,[2,10]}, {'DF',[5,5],[2,10]}, {'DF',[5,5,5],[2,8,10]}

will make no difference. But in case where the values in the force vector

are different, SFBM will generate a polynomial fit for the forces as a

function of position. For instance {'DF',[1,5,5],[2,8,10]} will generate a

quadratic function, while {'DF',[1,4,5],[2,8,10]} will generate a linear

expression and {'DF',[5,5,5],[2,8,10]}will generate a degree zero expression

There is no limit to the number degree of polynomial that can be used.

its is important that all concentrated loads and torques are listed in the

order of locations

For example:

SFBM('Prob 200',[20,5,20],{'CF',-2,0},{'M',10,8},{'DF',5,[1,3]},{'M',-10,12},{'DF',-4,[14,17]})

Name : Prob 200

Length: 20m

Supports: 5m and 20m

Point Load: 2N at point 0

Distributed Load: Constant 5N/m from 1m to 3m and Constant -4N/m from 14m to 17m

Moment: ACW 10Nm at point 8m and CW 10Nm at point 12

Solution:

The Freebody (with Legend), Shear Force and Bending moment diagrams are generated and saved in picture format titles Prob 200.png.

Lateef Adewale Kareem (2021). Shear Force Bending Moment (https://www.mathworks.com/matlabcentral/fileexchange/51047-shear-force-bending-moment), MATLAB Central File Exchange. Retrieved .

Created with
R2013b

Compatible with any release

**Inspired:**
Shear, moment, and hinge for Statically Determinate Beams

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!Create scripts with code, output, and formatted text in a single executable document.

Jose Maria SantosHi Lateef

Your code seems to be very nice, but I am trying to use it in Matla2014a, with your example calling SFBM('Prob 200',[20,5,20],{'CF',-2,0},{'M',10,8},{'DF',5,[1,3]},{'M',-10,12},{'DF',-4,[14,17]}), and I get it,

Warning: Struct field assignment overwrites a value with class

"double". See MATLAB R14SP2 Release Notes, Assigning Nonstructure

Variables As Structures Displays Warning, for details.

> In Diagrams at 176

In SFBM at 170

Reference to non-existent field 'XLim'.

Error in ConvertCoordinates (line 2)

XLim = axis.XLim; YLim = axis.YLim;

Error in Diagrams (line 184)

[xa0, ya0] = ConvertCoordinates(ax2, Xload,zeros(size(Xload)));

Error in SFBM (line 170)

Diagrams(X, ShearF, BendM)

Do you have how to fix it?

tnanks

Emmanuel RodriguezLateef,

Thank you for this! Fantastic code - extremely helpful.

Zachary PeekLateef,

How can you get the plots to output with the maximum moment and shear force labeled in the graph?

Thank you,

Zack Peek

Bruno GuidolimReally helpful! It is saving my life! Thank you Lateef!

Zachary PeekThis is a fantastic code, thank you for creating it. A very useful tool for any mechanical engineering student working on their senior design project.

Kwasi Bempongdjamel slimaniHi Mr

haw can i solve a loades shaft (stepped beam Multi daimetre)

Kar Yap LimCan anyone teach me how to use the code please ?

ALHi Lateef.

I am trying to use your code for a beam with no supports. This is the calling function

SFBM('STRIP ABCE3',[24],{'DF',1542.2,[0,14.1]},{'CF',-5357.9,0.6},{'CF',-13491.6,5.43},{'CF',-14478.2,14.1},{'DF',1205.2,[14.1,24]},{'CF',-7823.13,23.9})

The code only display the free body diagram and gives this error:

Value must be a vector of type single or double whose values increase

Error in Diagrams (line 176)

ax2.YTick = []; ax2.XTick = Xload;

Error in SFBM (line 170)

Diagrams(X, ShearF, BendM)

Error in Untitled (line 1)

SFBM('STRIP

ABCE3',[24],{'DF',1542.2,[0,14.1]},{'CF',-5357.9,0.6},{'CF',-13491.6,5.43},{'CF',-14478.2,14.1},{'DF',1205.2,[14.1,24]},{'CF',-7823.13,23.9})

Am I doing something wrong?

Phung TrungHi lateef. Thank for your code. Can you help me, to draw 2 force, one in xoz, and other in yoz?

Abishek AsaithambiFantastic work! The *png output looks clean and great. Thank you for your effort.

Lateef Adewale KareemHi Baruch,

Thats a good idea, I will look at it and suggest how it can be implemented. But we can use ode45 and call the bending moment solution for the second order derivative. I will see how I can implement this in my free time.

Hello Mohab, it works for non uniform distribution. even if the loading is a sine or cosine function. Just defined enough plot for the good polynomial approximation.

Mohab MahgoubHi Lateef,

Thanks for your code, it's really awesome. I just have one question, does it also work for non-constant distribution load? and what would be the solution for that? Thanks in advance!

Baruch SilesHi Lateef,

I'm interested in combining SFBM and Deflection m files, where SFBM calls Deflection. No changes to the calculations/formulas will be made only how SFBM reads the input data, how SFBM passes EI, etc. Am I allowed to do this? If I am, what are the steps to repost it in your fileshare?

Thanks, Baruch

Lateef Adewale KareemHello Baruch,

This is for statically solvable care (simple loading). For the case you are talking about, see my solution for statically indeterminate problems. you can put in the mechanical properties in that one. Thanks for the rating.

Baruch SilesHi Lateef,

It just occurred to me that the m file doesn't take into account the mechanical properties. Will the m file take into account this data in a later version?

Baruch SilesHi Lateef,

That was a very quick fix. I greatly appreciate your attention to the issue. 5 stars for timeliness.

Lateef Adewale KareemHello Baruch,

The issue has been addressed and a new update has been posted. you can download and use .

Baruch SilesHi Lateef,

Your code is very efficient. Beautiful. Thanks for taking a look at my issue. I look forward to the update.

Lateef Adewale KareemHello Phung,

Sure you can.

talk2laton@yahoo.co.uk

Phung TrungHilateef. Can i send you an email?

Lateef Adewale KareemHi Fernando,

nc was defined on line 20. There seemt o be something wrong. I tested it now and it worked. May be because you are using a different platform.

Hello Baruch,

you must be using 2019 version of Matlab, I will make adjustment that will take care of that error soon.

Hi Phung,

If you send me your problem, I may be a ble to guide you on how to use the code.

Phung TrungHi lateef. Thank for your code. It run perfect with me. But i have a problem with complex bearing shaft. I can not drawing graph in oxy and oyz plane in one graph. Can you help me. Thank

Baruch SilesHi Lateef,

I get an error on line 147 when I run the example for problem 200. The error is below.

>> SFBM('Prob 200',[20,5,20],{'CF',-2,0},{'M',10,8},{'DF',5,[1,3]},{'M',-10,12},{'DF',-4,[14,17]})

Error:File: SFBM.m Line: 147 Column: 8

Identifier 'NewCcrossed' is not a function or a shared variable. To share 'NewCcrossed' with nested function, initialize it in

the current scope. For more information, see Sharing Variables Between Parent and Nested Functions.

How do I fix this?

Fernando MenardiHi Lateef,

I got an error when try to run the "testing.m':

error: 'nc' undefined near line 106 column 19

error: called from

SFBM>SF at line 106 column 9

SFBM at line 144 column 13

testing at line 12 column 1

Could you help me fix it? I tried to fix it by myself, but still not working...

(I'm running it on the open source software brother of matlab, if that is the problem, could you help me make it compatible?

Lateef Adewale KareemThank you Abdullah Younas, sajjad Nasiri and Edward Etheridge.

I am sorry for the late response.

sajjad Nasiri:

This algorithm is handling only statically determinate problems. So there cannot be more than 2 supports. Even there there are two supports the two of them cannot be fixed.

Edward Etheridge:

I am sorry for your experience, you didnt do anything wrong. But due to no force applied in the problem, the algorithm could not calculate offset needed to use in the shearforce diagram. I have corrected that. and also took preemptive measure to prevent occurence of such from bending moment diagram.

A new version will be uploaded immediately.

Martin Sloth*if

Edward EtheridgeHi Lateef, finding this add on really useful but have one issue with the plotting of Moment loads.

This input "SFBM('WingBendingTorque',[ExposedSemiSpan,0],{'M',[TPTorque],[EnginePosition]})"

is giving me this error:

Error using matlab.graphics.axis.Axes/set

Value must be a 1x2 vector of numeric type in which the second element is larger than the first and may be Inf

Error in axis>LocSetLimits (line 272)

set(ax,...

Error in axis (line 101)

LocSetLimits(ax(j),cur_arg,names);

Error in Diagrams (line 245)

axis([Xmin, Xmax, Vmin, Vmax]);

Error in SFBM (line 170)

Diagrams(X, ShearF, BendM)"

Any idea what I'm doing wrong? The input values are ExposedSemiSpan = 15, TPTorque = 45 and Engineposition = 5.

sajjad NasiriHello, Mr Lateef Kareem

How can we solve the same problem with 5 support instead of 2 support?

Abdullah YounasAmazing work. Thank you very much. Works Perfectly..

Lateef KareemDear Christiaan de Freitas. Round is a function I created and used in my code. And its among the files you downloaded. You are getting that error because Matlab could not find the file. One possibility is you didnt pick up all the files you extracted.

he easiest way around this is to extract all the files into a particular folder, navigate to that folder, and then call the SFBM from that command window while the current folder is the folder containing the files you extracted.

Christiaan de FreitasChristiaan de FreitasHi Lateef,

My command is

SFBM('Shaft3' ,[0.32,0,0.16],{'CF',-6100,0.03},{'M',1400,0.32})

Warning: File: SFBM.m Line: 106 Column: 9

Defining "NewCcrossed" in the nested function shares it with the

parent function. In a future release, to share "NewCcrossed"

between parent and nested functions, explicitly define it in the

parent function.

Warning: File: SFBM.m Line: 106 Column: 26

Defining "NewMcrossed" in the nested function shares it with the

parent function. In a future release, to share "NewMcrossed"

between parent and nested functions, explicitly define it in the

parent function.

Undefined function or variable 'Round'.

Error in SFBM (line 65)

Xload = Round(Xload,2);

As I am very new to matlab, I do not know what this means, could you possibly help me out?

Santiago GiovannettiLateef Adewale KareemTsee Lee thank you for your comment. I just d not understand what you meant by more remark aside providing guidance on how to use the code.

Tsee LeeWhat is the rationale for not providing more remarks in this otherwise brilliant code? Thank you.

Lateef Adewale KareemThank you Ghattas Ghattas. The algorithm was designed for simply supported beam. A beam cannot have three supports and be simply supported. That will lead to statically indeterminate problem, requiring inputs about the material properties to solve.

This isnt designed for such problem.

I might create such I the future, but not now.

Ghattas GhattasThat's so brilliant.

But didn't work when i have a beam with 3 supports.

anyway to make it work in this situation.

Lateef Adewale KareemDear Armando the only way you could be getting that error is that you didn't download the complete functions. To solve this problem, you have to download the files again. And then try the problem again.

Let me know if this works.

Lateef Adewale KareemDear Armando the inky way you could be getting that error is that you didn't download the complete functions. To solve this problem, you have to download the files again. And then try the problem again.

Let me know if this works.

Armando MartinezI am getting an error message

Undefined function or variable 'SpecialPoints'.

Error in SFBM (line 169)

SpecialPoints(X, ShearF, BendM);

I used the example posted in the description above to make sure I was not doing anything wrong and still got the same message.

Lateef Adewale KareemDear Kelvin, on this , I am not sure why you are having that problem. But I can help if I see the actual problem. Can you send the problem to my email?

Talk2laton@yahoo.co.uk

Kevin CastilloI'm not sure if anyone else is having the same problem or not but I have a simply supported beam with two forces acting on it. My Shear force diagram reads these forces correctly (Starting at zero and ending at zero), but my moment diagram does not do the same.

Any insight on this?

Lateef Adewale KareemOK. Just put in your problem. When the result is out. Replace N with lbf, m with ft .

You are good to go

Kevin CastilloMy apologies. I didn't see the download button in the upper right hand corner.

Unfortunately I need the units in lbf and lbf-in (US Customary units) is there any way to convert your code to do that?

Lateef Adewale KareemDear Kelvin, the function takes unlimited number if arguments. And cannot complain of too many arguments unless you didn't send in the loads as cells.

If you can send me the problem in my email, I can show you how to use the code.

talk2laton@yahoo.co.uk

Kevin CastilloWhen I ran the function in my code I received an error saying I had too many input arguments. Any insight?

I have two point loads and 2 reaction forces on my simply supported beam.

Lateef Adewale KareemDear Justin.

Thank you for that observation. The code has been updated to take care of that problem. The new version no linger uses refline. instead a plot function is used in its place.

If you notice any new problem, please do not hesitate to drop it in the comment section.

JustinGetting warnings and errors using Matlab 2018B and running the example provided in the readme.

Might be nice for Mathworks to check that code works in latest release before publishing it as the File Exchange pick of the week (or at least clearly outline the toolbox dependencies).

Because refline isn't part of core Matlab (only available in statistics toolbox), Diagrams.m plots the shear force diagram and then fails before it can plot the bending moment diagram. Temporary fix is to comment out the refline calls on lines 242 & 285.

Warning: File: SFBM.m Line: 106 Column: 9

Defining "NewCcrossed" in the nested function shares it with the parent function. In a future release, to

share "NewCcrossed" between parent and nested functions, explicitly define it in the parent function.

Warning: File: SFBM.m Line: 106 Column: 26

Defining "NewMcrossed" in the nested function shares it with the parent function. In a future release, to

share "NewMcrossed" between parent and nested functions, explicitly define it in the parent function.

'refline' requires Statistics and Machine Learning Toolbox.

Error in Diagrams (line 242)

refline(0,0);

Error in SFBM (line 170)

Diagrams(X, ShearF, BendM)

Lateef Adewale KareemMr Mahdi Naim

I think this problem does not require my code. You just divide the summation of all the loads by the length of the beam. That gives you the distributed reaction.

Note. This will work provided there is no torque acting on the beam.

Mahdi NaimThank you Mr. Lateef Adewale, I want to ask what if I have a distributed support ? is it possible? and how shall I insert it in the call command. if not can you define it within the code?? Thanks in advance

Lateef Adewale KareemDear David Zhang, the error has now being corrected and you can download the new version of the code and test further.

Thanks for your contribution

Lateef Adewale KareemDear David Zhang.

This method solves the problem numerically. hence there are approximations whose effect get amplified for some specific problems like the one you have here.

I have another version that solves analytically and so is immune to this kind of problem.

if you give me your email, I can send you the solution

David ZhangI used this command and got erroneous shear and bending equation:

SFBM('shaft',[0.24164, 0, .18289],{'CF', -4.035, 0.09059})

the diagrams are correct but the equations are wrong

David ZhangI've changed the beginning of SFBM to

function [varargout] = SFBM( varargin)

and the end (before "end" statement) to

varargout = {X, ShearF, BendM};

to support further analysis using your shear and bend results

David ZhangOne more suggestion.

This program would be even better if it supports loads from the second direction (in and out of the page). There would be an additional shear force diagram, and a "total" moment diagram from moments generated from the shear forces in both dimensions.

Lateef Adewale KareemHello Mahdi Naim,

You are using an old version of Matlab. you are going to have to change that line

Height = (Ymax - Ymin)/ax2.Position(4);

you will replace it with two lines:

Height = get(ax2, 'Position');

Height = (Ymax - Ymin)/Height (4);

That should work. But it means you will have to do the same for everywhere I used the . operator to get or set a property.

The easiest solution is to use Matlab 2014 or later

good luck.

Mahdi NaimAttempt to reference field of non-structure array.

HELP!!!!!!!!!! I got this error !!!! I need the code so bad & so fast !!! PLEASE ANYONE FIX THIS!!!!!!!

Error in Diagrams (line 182)

Height = (Ymax - Ymin)/ax2.Position(4);

Error in SFBM (line 166)

Diagrams(X, ShearF, BendM)

David JoséExcelent code ;)

Lateef Adewale KareemDear Tom Hendrickx

I cant make it faster. the faster one is not free

Tom HendrickxHello, I find it a very interesting code but it is a little bit slow, is there a possibility to get it faster?

Brendan WilsonI keep getting the following error when trying to use more than two supports on the beam. Is there an easy solution?

Index exceeds array bounds.

Error in SFBM/SF (line 108)

if x > Cloc{i}

Error in SFBM (line 141)

[sf,bm] = SF(xx);

Tay Ming EnDear developer, may I know if this program is able to solve for indeterminate support beams?

Mai Abdul LatifLateef Adewale KareemDear Varda Ahmed, the situation that you described is the exact case the program is designed to solve.

Varda AhmedDoes this code work for a problem that has a hinge at the end and a roller at a point under the beam?

Tanner Wick**my issue, mistake not in source file

Tanner WickThis is great! Thank you! There is a spelling mistake in line 312 of diagrams.m (monent)

Lateef Adewale KareemHi Victor Luna, the values of the your length are 2 orders higher than what I used to prepare the algorithm.

The easiest solution is, you scaled down the lengths by factor of 100.

ie

SFBM('Load Case B',[118,34,109],{'DF',-39,[10,118]},{'DF',-4,[0,19]},{'CF',-1.35*4000,34},{'CF',-1.35*5000,94});

or if you want to sue the same length, insert

if numel(Xtick) > (numel(PSF) + 1)

d = Xtick(2:numel(Xtick))./Xtick(1:numel(Xtick)-1);

i = find(d<1.001);

Xtick(i+1) = [];

end

immediately after line 210 in Diagrams.

Victor LunaHi, I'm having trouble when applying a concentrated force on directly on the supports. I get error on the diagram script. Here's my code:

>> SFBM('Load Case B',[11800,3400,10900],{'DF',-39,[1000,11800]},{'DF',-4,[0,1900]},{'CF',-1.35*4000,3400},{'CF',-1.35*5000,9400});

If I remove the load applied on 3400 the code works, however when using it, I get an error on the diagram script:

Index exceeds matrix dimensions.

Error in Diagrams (line 215)

equa1 = ['$',makeequation(PSF{n - 1}),'$'];

Error in SFBM (line 166)

Diagrams(X, ShearF, BendM)

Any help on solving this issue?

Lateef Adewale KareemDear BlueEyes, a new update will soon b uploaded that will ensure compatibility with your 2012 version

BlueEyesPlease, author, be kind to help me on overcome the drawback. Thank you in advance

Ref.: MATLAB version: R2012b

---------------------

Next input comes from your suggested example

>> SFBM('Prob 200',[20,5,20],{'CF',-2,0},{'M',10,8},{'DF',5,[1,3]},{'M',-10,12},{'DF',-4,[14,17]})

Error using round

Too many input arguments.

Error in SFBM (line 65)

Xload = round(Xload,2);

-----------------------

Lateef Adewale KareemDear Ebenezer Duah, if you send me your problem, I may be able to help you. its really easy to understand, you just didnt pay enough attention to the description.

Before the end of November, I will post youtube videos on how to use the code. I hope that will help

Ebenezer DuahThis is really difficult to understand..

Lateef Adewale KareemDear Gokul Maharaj Badrinath please let me have the problem you are trying to solve

Gokul Maharaj BadrinathIndex exceeds matrix dimensions.

Error in SFBM/SF (line 108)

if x > Cloc{i}

Error in SFBM (line 141)

[sf,bm] = SF(xx);

im getting this error when I use this SFBM function.can someone help me solve that?

Lateef Adewale KareemDear Shivang Khandelwal, what version of Matlab are you using?

Shivang KhandelwalDear Lateef,

This is amazing, just wondering if you have an update for the refline error.

Thanks

Lateef Adewale KareemDear Rodrigo Pierott, I have done that already. The code was originally made for 2 supports. and the example is described in the read me file. One support (Cantilever) was recently added.

Rodrigo PierottWill you develop any update for more than one support? That's exactly what I need.

Thank you!

Joe RandazzoCharles SimoneauGeorgios BalomenosGreat code! Does it work for more than 2 supports?

Brianna CrockerGreat code but it seems to only output the FBD and SFD not the BMD. Any advice?

Anna ScholzHey, works very nice! Have you already done a cantilever update?! I'd need that! Thank you!

Rohan MaharjajnHi Lateef Kareem..

I can't execute the code..

"??? Attempted to access Cload(:,1); index out of bounds because size(Cload)=[0,0].

Error in ==> Diagrams at 7

force1 = Cload(:,1);

??? Index exceeds matrix dimensions.

Error in ==> SFBM at 7

Name = varargin{1};"

The above error shows up.. Please help me with this. I am using R2011a version.

CyberzExcelent code!

Just waiting for the cantilever beam upgrade :-)

Xavier SanderHi. Awesome code. I've got a problem where the function won't accept strings as inputs.

for example:

x = 1;

SFBM('Prob 200',[20,5,20],{'CF',x,0})

won't work, but

SFBM('Prob 200',[20,5,20],{'CF',1,0})

will. any thoughts?

thanks

Lateef Adewale KareemDear Mary Kate. refline may have been changed to in 2016 that it no longer takes 0,0 a argument. I don't have matlab 2016.

I will however try to make an adjustment so that refline is no longer required. but before that I will check the documentation for refline to know the changes that were implemented and then modify the code accordingly. The new version will be available shortly

Mary KateAlso, the output only includes a shear diagram and not a moment diagram.

Mary KateHi. Awesome code thanks for sharing!!

I am using MATLAB 2016 and am getting the following error messages.

Error in Diagrams (line 196)

refline(0,0)

Error in SFBM (line 170)

Diagrams([0,X],[0,ShearF],[0,BendM])

Any assistance in resolving these would be greatly appreciated. Thanks.

Benjamin MarriottLateef Adewale Kareemok laura, although the program was developed for SI units, it works fine with inches and pounds too. just be consistent in the way you use the parameters

lauraGreat program! Is there anyway to do this in inches and pounds?

Lateef Adewale KareemDear Abhishek Singh

Thank you for the rating.

I will provide an upgrade to the function so it can handle cantilever cases. It should be available by the first week of January. Please bear with me.

Regards.

Lateef

Regards

Nina Kirstin PacamalanHello Lateef! It doesn't work. The result shows:

Error in ==> SFBM at 7

Name = varargin{1};

??? Index exceeds matrix dimensions.

Can you please help me with this error? Thanks

Abhishek SinghNice program Lateef.

But will it work for cantilever beam?

SFBM('som q1',[20,0,0],{'CF',-2,5});

I tried this command but it is not working.

Can you help me with this as soon as possile.

Anyhow, you program is really versatile.

Lateef Adewale KareemDear Alex Blum

The code has been updated. I now works in 2015 matlab. you can test your problem again.

Lateef Adewale KareemDaer Alex Blum.

I just saw your comment. I will prepare an update to make it work and it will be available for download shortly.

Alex BlumDoesn't work in 2015. Tried with provided example code and with the code:

SFBM('Test', [10,1,9],{'CF',5,1},{'CF',5,9},{'CF',-10,5})

Both result in the following error:

Undefined operator '*' for input arguments of type

'matlab.graphics.axis.Axes'.

Error in arrow (line 423)

ax = o * gca;

Error in Diagrams (line 40)

Arr = arrow([xl,yl1],[xl,yl2],10,90,20,2);

Error in SFBM (line 176)

Diagrams([0,X],[0,ShearF],[0,BendM])