I have a main script in which I am using diffrent functions that I made but it is giving an error in one of the function. And the error in one line of a particular function is 'Not enough input arguments'. Line 17 has an error Here is the function:
function [NodeMat]=Function_Sofistik_ReadNodes(FileName,NodeIDstr)% clear all;close all;clc
% FileName=['MainModel' '_NODES_' '.lst']; % Sofistik .lst file name
% NodeIDstr='DATA EXTRACTION: NODE DATA'; % Header to search in Sofistik nodes output file
addpath Functions;addpath SofistikFiles ;% Read node coordinates output file and save data
fid_node=fopen(FileName,'r');countRN=1;while 1 line_node=fgetl(fid_node); if ~ischar(line_node); break; end NodeFileData{countRN,1}=line_node; if (isempty(NodeFileData{countRN,1},NodeIDstr))~=1 break; NodeLineNo=countRN; end countRN=countRN+1;endfclose(fid_node);% Save Nodes
countSN=1;while isnumeric(str2num(NodeFileData{NodeLineNo+countSN+1,1})) && isempty(str2num(NodeFileData{NodeLineNo+countSN+1,1}))==0 TempNode=str2num(NodeFileData{NodeLineNo+countSN+1,1}); if length(TempNode)==4 && TempNode(1)~=0 NodeMat(countSN,:)=str2num(NodeFileData{NodeLineNo+countSN+1,:}); end countSN=countSN+1;end
Best Answer