![Capture.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/243946/Capture.png)
How to copy and paste the code with matlab layout when asking question here?
50 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Zeynab Mousavikhamene
el 22 de Oct. de 2019
Comentada: Walter Roberson
el 23 de Feb. de 2022
When I copy and paste the code here, it is like a simple text which is not easy to follow. How can I paste it here with matlab layout?
Respuesta aceptada
Walter Roberson
el 22 de Oct. de 2019
Look in the toolbar at the section marked "CODE", and click on the icon that looks like a > symbol. That will give you a code entry area that you can paste code into.
Alternately, you can paste your code in to a regular area, and then select it with your mouse and click the > icon to have it converted to a code section.
2 comentarios
Windsor Konkwane
el 23 de Feb. de 2022
I use an android smartphone. I want to copy code from a separate script into the one I am currently working on. How do I go about or alternatively, are smrtphones compatible to perform this task?
Walter Roberson
el 23 de Feb. de 2022
At present the editor you get for mobile is an older editor.
You can paste in code and then highlight it with long-press and drag the boundary handles that show up. Then press the {} of the toolbar.
Alternatively, you can take advantage of formatting rules. The input is examined by paragraphs, where a paragraph is a group of lines delimited by an empty or all-blank line (or start or end of all input). If the first character of the paragraph is a space then the entire paragraph is treated as pre-formatted code, except that iirc one or two leading space per line may be trimmed. (Technically there is a difference between the case where the paragraph begins with one space or two spaces, but it can be tough to find the difference.)
Más respuestas (0)
Ver también
Categorías
Más información sobre Historical Contests en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!