Home MATLAB - understanding ndgrid
Reply: 0

MATLAB - understanding ndgrid

Simplicity
1#
Simplicity Published in 2018-01-11 22:56:29Z

I checked MATLAB's ndgrid documentation page, but didn't get the idea fully.

For instance, I did the following:

[x,y] = ndgrid([1,2,3],[4,5,6])

The output was:

x =

     1     1     1
     2     2     2
     3     3     3


y =

     4     5     6
     4     5     6
     4     5     6

Why is the result displayed like this? [1 2 3] returned three times as columns, and [4 5 6] returned three times as rows?

Thanks.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.320846 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO