フィルターのクリア

fscanf problem and get invalid file identifier

3 ビュー (過去 30 日間)
vaya putra
vaya putra 2022 年 9 月 6 日
回答済み: Walter Roberson 2022 年 9 月 6 日
base on handbook i write the fucntion as below.
but i am confuse why i got error
Error using fscanf
Invalid file identifier. Use fopen to generate a valid file identifier.
function [npoin,nelem,nvfix,ntype,nnode,ndofn,ndime,ngaus, ...
nstre,nmats,nprop,lnods, matno,coord,props,nofix, ...
iffix,fixed]=input_fem_elast();
format long;
global in;
global out;
%--- read the Control data:
npoin=fscanf(in,'%d',1);

採用された回答

Walter Roberson
Walter Roberson 2022 年 9 月 6 日
  • possibly the fopen() failed
  • possibly the fopen worked but you did not assign it to a variable named in
  • possibly the fopen worked and you assigned to in but in was not declared global in the place it was assigned to

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLow-Level File I/O についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by