Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Alright, I\'m having a bit of an issue with a matlab problem: http://www.chegg.c

ID: 1855345 • Letter: A

Question

Alright, I'm having a bit of an issue with a matlab problem: http://www.chegg.com/homework-help/applied-numerical-methods-w-matlab-3rd-edition-chapter-3-problem-10-solution-9780073401102 I have two different m-files. The first is as follows: function beamProblem(x),xx = linspace(0,x); n=length(xx); for i=1:n uy(i) = -5/6.*(sing(xx(i),0,4)-sing(xx(i),5,4)); uy(i)=uy(i) + 15/6.*sing(xx(i),8,3) + 75*sing(xx(i),7,2); uy(i)= uy(i) + 57/6.*xx(i)^3 - 238.25.*xx(i); endclf,plot(xx,uy,'--') The second is: function s = sing(xxx,a,n);if xxx > a s = (xxx - a).^n; else s=0; end I get the following error when I try to run it: "Error: File: beamProblem.m Line: 1 Column: 24 Unexpected MATLAB expression.a" I just need help generating the plot. Thanks in advance!

Explanation / Answer

SINCE COS 2X=1-2SIN^2
MAKE SIN^2 subject of formula
2SINX^2=1-COS2X
SINX^2=0.5 [1-COS2X}
THEREFORE SINX^6=0.5[1-COS12X]
REPLACE X=6 IN THE ABOVE EQUATION

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote