Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Cell Syntax Quiz
Replies: 6   Last Post: Jan 11, 2013 8:28 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bruno Luong

Posts: 8,565
Registered: 7/26/08
Re: Cell Syntax Quiz
Posted: Jan 11, 2013 3:26 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I'll try to answer the quiz without MATLAB:

> % CELL SYNTAX QUIZ
>
> close all, clc
>
> % For each expression
> % 1. Write the command line response
> % 2. Cut and paste the expression into the command line
> % 3. Award yourself 6 points for each correct answer
> % 4. Add 5 extra points if the expression is one of the last 2
>
> A{1,1} = [1 2 ]
> A{2,2} = [ 5 6 ]
> A{2,1} = 4
> A{1,2} = 3
> A{ : }
> A{ : , : }
> A{ : , : , : }


> isequal( A{ : } , A{ : , : } )

return false

>
> B0 = A
> isequal(A,B0)


return true

> B1 = A{:}
> B2 = A{:, :}
> isequal( B1 , B2 )


return true

>
> whos
> cell2mat(B0)


return an error

% Bruno



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.