Effect of clear at the top of a script

Earlier in your session you stored a uniform load w = 5 (kN/m) and a span L = 2.4 (m) in the workspace. You then run this script:


MATLAB
% beam_moment.m  Maximum moment, simply supported beam
clear; clc;
Mmax = w*L^2/8      % kN*m


What happens?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More MATLAB Scripts (M-files) Questions: