Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

jrodriguez2315

  • 3 years ago

Can anyone help me with this MATLAB code

  • This Question is Closed
  1. jrodriguez2315
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    function Pascaltri(k) if k<0 error('Number of Terms Must Be Positive') end PascalTriangle=[1]; for (j=1:k); p=[1]; for (s=1:length(PascalTriangle)-1); p=[p,PascalTriangle(s+1)+PascalTriangle(s)]; end p=[p,1]; disp(p) PascalTriangle=p; end end

  2. jrodriguez2315
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I need a way to print this in this form: 1 1 1 1 2 1 1 3 3 1

  3. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy