For example, I have a M=8*8 matrix and I want the default to be NA. But M(1-4,5-8) as 0
Thanks very much
How to create a matrix with Na and certain values as 0
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
How to create a matrix with Na and certain values as 0
- Attachments
-
- Capture.PNG (4.44 KiB) Viewed 3820 times
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13323
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How to create a matrix with Na and certain values as 0
Lots of different ways. Here's one:
Code: Select all
matrix(8,8) x
x=na
matplace(x,0*@ones(4,4),1,5)
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 19 guests