🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

save curve data in excel or .txt into specified path

User: "satya swaroop"
Altair Community Member
Updated by satya swaroop

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

Find more posts tagged with

Sort by:
1 - 2 of 21
    User: "João Marabisa"
    Altair Employee
    Updated by João Marabisa

    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.

    User: "satya swaroop"
    Altair Community Member
    OP
    Updated by satya swaroop

    Hello 

    João Marabisa
     
    Thank you very much it worked