Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to write a 2D matrix into gii file in matlab? #13

Open
vidasun opened this issue Sep 28, 2023 · 1 comment
Open

How to write a 2D matrix into gii file in matlab? #13

vidasun opened this issue Sep 28, 2023 · 1 comment

Comments

@vidasun
Copy link

vidasun commented Sep 28, 2023

Hi! I used the gii.cdata matrix to perform filtering. And after that, I wondered if there's any way to write this 2D matrix into a new gii file.?I've looked at the example in tutorial and it seemed the isosurface function can only be used on 3D data. Thanks!

@gllmflndn
Copy link
Owner

Hi @vidasun,
If I understand you correctly, you can use the .cdata field to store your 2D array and have it saved in a new GIfTI file, e.g.:

g = gifti;
g.cdata = rand(256,16);
save(g,'data.gii')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants