save curve data in excel or .txt into specified path

satya swaroop
satya swaroop Altair Community Member
edited June 2022 in Community Q&A

Hi 

R = omlfilename()
R = omlfilename('fullpath')
close all;
clear all;
clc;
c1=readvector('.odb','loadstep2:','RF-Reaction force (PART-1-1)','N1','Z')
plot(c1)
c2=readvector('.odb','loadstep2:','Displacement (PART-1-1)','N1','Z')
c=plot(-c2,-c1)
R=xlswrite('test.csv',[c1; c2])

i am generating a curve with this code 

 

now i want to save or export the data points of plotted curved in the form of xlsx or txt in a specified path 

how can i do this 

appreciate your comments

thanks

Tagged:

Answers

  • João Marabisa
    João Marabisa
    Altair Employee
    edited June 2022

    Hi Satya,

    There are some ways to do that, the easiest one would be: After que command 'c=plot(-c2,-c1)' you can break the line and change a bit your code:

    c=plot(-c2,-c1)
    fpath = 'C:\Users\jmarabisa\Desktop\';
    R=xlswrite([fpath 'test.csv'],[c1; c2]);

    'fpath' is the variable that you'll be referencing your desired path to save the xlsx file.

    Hope it helps you,

    João.

  • satya swaroop
    satya swaroop Altair Community Member
    edited June 2022

    Hello 

    João Marabisa
     
    Thank you very much it worked