Advertisement

matlab fscanf, comma-separated; how to use comma as delimiter in sscanf and fscanf examples

阅读量:

Definition and Usage

定义和用法

The fscanf() function parses the input from an open file according to the specified format.

fscanf()函数的作用是:从文件中按照指定的格式输入。

Syntax

语法

fscanf(file,format,mixed)

Parameter参数Description描述

fileRequired. Specifies the file to check

必要参数。指定文件对象

formatRequired. Specifies the format.

必要参数。指定格式

Possible format values:

可用的格式值:

%% - Returns a percent sign

%% - 返回一个“%”

%b - Binary number

%b – 二进制数

%c - The character according to the ASCII value

%c – 某字符所对应的ASCII值

%d - Signed decimal number

%d – 包含正负号的十进制数(可包含正负数)

%e - Scientific notation (e.g. 1.2e+2)

%e – 科

全部评论 (0)

还没有任何评论哟~