Can I update my Matlab behavior
Sorry for the poor title, not sure how to explain it.
I have two questions:
1) When we write three dots to split a command line, can we change what happens?
examplepath = ‘thisisapath’; % This is a random string
examplepath = [‘thisisa…’ …
‘path’]; % this is the same string if I write three dots "…" somewhere
% This is a bad behavior because it breaks the string
%% What I want Matlab to do when I write three dots:
examplepath = [‘thisisa’, …
‘path’];
This is what I want to do when I write three dots and press enter, I want to split whatever I wrote so it fits on 2 lines and I don’t have to use the horizontal slider bar because my sentence is too long. Is it be possible to update such behavior?
2) Indentation changed a few versions ago, I now use 2023a.
If I have a loop for example, when I paste code to it, I want it to be indented where it should be by default, not at the begining of the line. Example:
for i = 1:10
% something I wrote here here
% someting I pasted
end
%% It should be:
for i = 1:10
% something I wrote here here
% someting I pasted
end
It would be great to save these selection + ctrl+i, clicking at a random place inside a loop before was giving you an indented space, I want the same behavior.
Thanks!Sorry for the poor title, not sure how to explain it.
I have two questions:
1) When we write three dots to split a command line, can we change what happens?
examplepath = ‘thisisapath’; % This is a random string
examplepath = [‘thisisa…’ …
‘path’]; % this is the same string if I write three dots "…" somewhere
% This is a bad behavior because it breaks the string
%% What I want Matlab to do when I write three dots:
examplepath = [‘thisisa’, …
‘path’];
This is what I want to do when I write three dots and press enter, I want to split whatever I wrote so it fits on 2 lines and I don’t have to use the horizontal slider bar because my sentence is too long. Is it be possible to update such behavior?
2) Indentation changed a few versions ago, I now use 2023a.
If I have a loop for example, when I paste code to it, I want it to be indented where it should be by default, not at the begining of the line. Example:
for i = 1:10
% something I wrote here here
% someting I pasted
end
%% It should be:
for i = 1:10
% something I wrote here here
% someting I pasted
end
It would be great to save these selection + ctrl+i, clicking at a random place inside a loop before was giving you an indented space, I want the same behavior.
Thanks! Sorry for the poor title, not sure how to explain it.
I have two questions:
1) When we write three dots to split a command line, can we change what happens?
examplepath = ‘thisisapath’; % This is a random string
examplepath = [‘thisisa…’ …
‘path’]; % this is the same string if I write three dots "…" somewhere
% This is a bad behavior because it breaks the string
%% What I want Matlab to do when I write three dots:
examplepath = [‘thisisa’, …
‘path’];
This is what I want to do when I write three dots and press enter, I want to split whatever I wrote so it fits on 2 lines and I don’t have to use the horizontal slider bar because my sentence is too long. Is it be possible to update such behavior?
2) Indentation changed a few versions ago, I now use 2023a.
If I have a loop for example, when I paste code to it, I want it to be indented where it should be by default, not at the begining of the line. Example:
for i = 1:10
% something I wrote here here
% someting I pasted
end
%% It should be:
for i = 1:10
% something I wrote here here
% someting I pasted
end
It would be great to save these selection + ctrl+i, clicking at a random place inside a loop before was giving you an indented space, I want the same behavior.
Thanks! behavior MATLAB Answers — New Questions