How can I keep the blue dot data into variable to use it on other step?
Thx for all answer

2 Comments

How can I keep the blue dot data into variable to use it on other step?
The pks variable is already there, you can use that variable in the preceding section of the code.
Do you want to store in the computer?
I want to use it in other function . So I can write pks to call the dot data right? and yes i want to store it

Sign in to comment.

 Accepted Answer

KALYAN ACHARJYA
KALYAN ACHARJYA on 27 Feb 2021
Edited: KALYAN ACHARJYA on 27 Feb 2021
First case:
The data is already there (store in the workspace, variable named as pks). You can use the data in proceeding spart of the code (Same script)
Just type pks in the command window, you can see it's values, it may be 1 dimentional array data
Second case:
If you want do save the array in computer for future reference, you can do that multiple ways
dlmwrite('pks_data.txt',pks); % Save in text file (Same Working Directory)
Or save in excel or any other file format (including text), please follow the link
Third Case:
Other function: Declare as global variable
Hope it Helps!

4 Comments

So if i open other file how can I call it ? such as just write pks;
Sorry to ask something stupid I am newbie here
So if i open other file how can I call it ? such as just write pks;
I assumed that the other file means another MATLAB script, you can call / load the file (available in the directory). This is a file with data, load when you need pks data.
Sorry to ask something stupid I am newbie here.
No, of course not, we (most) are all learners here. Questions are welcome, it helps us to understand the subject further.
:)
And last question how can I plot the pks data that I save on another script
Load the pks text file (from the save folder), use readmatrix
pks_data=readmatrix('filename.txt')
plot(pks_data)

Sign in to comment.

More Answers (0)

Categories

Tags

Community Treasure Hunt

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

Start Hunting!