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

Added Reverse a String in MATLAB #2033

Merged
merged 2 commits into from
Oct 3, 2020
Merged

Added Reverse a String in MATLAB #2033

merged 2 commits into from
Oct 3, 2020

Conversation

iwishiwasaneagle
Copy link
Contributor

Congrats on taking the first step to contributing to the Sample Programs repository maintained by The Renegade Coder!
For simplicity, please make sure that your pull request includes one and only one contribution.

Complete the Applicable Sections Below

Find which section best describes your pull request and make sure you fill it out. To start, let us know which issue you've fixed.

Code Snippets

  • I named the pull request using Added/Updated <Sample Program> in <Language> format
  • I created/updated the language README
    • I added the sample program name to the README
    • I added fun facts (i.e. debut developer, typing, etc.)
    • I added reference link(s) to the README
    • I added solution citations when necessary (see plagiarism)

Testing

  • I named the pull request using Added/Updated <Language>/<Project> Testing format
  • I followed the testinfo template, if applicable

Notes

Feel free to describe what you added or updated.

@iwishiwasaneagle iwishiwasaneagle changed the title Reverse a string in matlab Added Reverse a string in matlab Oct 2, 2020
Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but we generally expect programs to be executable (i.e. accept a string off the command line).

@jrg94 jrg94 changed the title Added Reverse a string in matlab Added Reverse a String in MATLAB Oct 2, 2020
@jrg94 jrg94 self-assigned this Oct 2, 2020
@jrg94 jrg94 added enhancement Any code that improves the repo reverse string See: https://sampleprograms.io/projects/reverse-string/ labels Oct 2, 2020
@jrg94 jrg94 added this to the 500 Code Snippets milestone Oct 2, 2020
@iwishiwasaneagle
Copy link
Contributor Author

iwishiwasaneagle commented Oct 3, 2020

This looks good, but we generally expect programs to be executable (i.e. accept a string off the command line).

Can you expand on this please? Looking at the other MATLAB samples it seems that they're almost all functions like this.

Edit: I did some more research, and this is actually already usable from the command line like this. MATLAB doesn't really work from the terminal like Python or something. So in order to run this you could do something like matlab -nodisplay -nojvm -r 'reverse_a_string("Hello, World!")'; but this then starts a MATLAB instance as seen in the screenshot
image

@jrg94
Copy link
Member

jrg94 commented Oct 3, 2020

Yeah, the MATLAB examples aren't great. Ideally, these should be executable programs. Perhaps MATLAB doesn't fit the typical requirements for this repo. I'll go ahead and merge this for now, and then we'll try to figure out the best path forward at a later time.

Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jrg94 jrg94 merged commit bdd619d into TheRenegadeCoder:master Oct 3, 2020
@iwishiwasaneagle iwishiwasaneagle deleted the rev_string branch October 4, 2020 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any code that improves the repo reverse string See: https://sampleprograms.io/projects/reverse-string/
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add Reverse A String in Matlab
2 participants