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

change strings to char array for old matlab compatibility #70

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

aleruggeri87
Copy link

My MATLAB R2017b supports strings, but it seems the set function doesn't handle them well.
To work around this, I used char arrays for parameters.
I assume this workaround is compatible with newer versions as well, considering that char arrays are used elsewhere in the code.

Best,
Alessandro.

@bastibe
Copy link
Owner

bastibe commented May 3, 2024

Thank you for the pull request.

This seems innocuous enough, but we should verify that this doesn't break anything on newer versions of Matlab. I don't have access to Matlab any longer. Could you, or somebody else, cross-check that this works on a recent Matlab?

@aleruggeri87
Copy link
Author

The current set documentation page is somewhat vague regarding the types of parameters it accepts. While the examples primarily use strings, there are instances where character arrays are also used.
Since I do not have access to the latest version of MATLAB, I asked around and found a colleague who has R2021a. He tested the set function with character arrays, and it is still working in that version.
Maybe some other user can help by trying with newer versions.

Cheers,
Alessandro.

@bastibe bastibe merged commit d922d23 into bastibe:master Jul 3, 2024
@bastibe
Copy link
Owner

bastibe commented Jul 3, 2024

Thank you very much, then!

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

Successfully merging this pull request may close these issues.

2 participants