Filter löschen
Filter löschen

Edit a number like mass in Nastran .bdf file

3 Ansichten (letzte 30 Tage)
farzad
farzad am 7 Dez. 2017
Bearbeitet: Stephen23 am 4 Feb. 2018
Hi all
I want to modify mass parameter in a bdf file using matlab. checking this code but I couldn't edit it in a way to change the 4th column in front of CNOM
fname = 'bpillar.bdf' ;
fid = fopen(fname,'r') ;
S = textscan(fid,'%s','Delimiter','\n');
fclose(fid) ;
S = S{1} ;
%%Get the line number of CBEAM
idxS = strfind(S, 'CBEAM');
idx = find(not(cellfun('isempty', idxS)));
cbeam = S(idx(2:end)) ;
k = cellfun(@strsplit,cbeam,'un',0) ;
iwant = cell2mat(cellfun(@str2double,k,'un',0)) ;
  1 Kommentar
Stephen23
Stephen23 am 4 Feb. 2018
Bearbeitet: Stephen23 am 4 Feb. 2018
@farzad: please upload a sample file by clicking the paperclip button.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu MATLAB Report Generator finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by