Skip to content

Commit

Permalink
240504 first
Browse files Browse the repository at this point in the history
  • Loading branch information
peisipand committed May 4, 2024
1 parent b04c5af commit 33fa66b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _posts/2024-05-23-Matlab_Save nc.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ tags:

很多卫星产品和气象模型喜欢使用nc文件类型,其优点是存储高效。NC文件的结构大致为**变量****属性**。属性分为**全局属性****变量属性**

1. 创建全局属性
1.创建全局属性

```
copyfile(which("example.nc"),"myfile.nc")
fileattrib("myfile.nc","+w")
creationDate = ncreadatt("myfile.nc","/","creation_date")
```

2. 修改变量的属性
2.修改变量的属性

```
copyfile(which("example.nc"),"myfile.nc")
fileattrib("myfile.nc","+w")
oldDescription = ncreadatt("myfile.nc","peaks","description")
```
3. 以a.nc为样板,创建一个b.nc,并按照修改变量
3.以a.nc为样板,创建一个b.nc,并按照修改变量

```
clc;clear;
Expand Down

0 comments on commit 33fa66b

Please sign in to comment.