How would my code be written in psuedocode?
81 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Raiven Balderas
am 10 Feb. 2018
Kommentiert: Walter Roberson
am 10 Feb. 2018
How would my code attached be written in pseudocode? im working on a bisection method. MY code is attached in file
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 10 Feb. 2018
There is no standard for what is required or permitted in pseudocode, so all MATLAB code is also pseudocode.
2 Kommentare
Walter Roberson
am 10 Feb. 2018
Change everything of the form
A = B;
to
assign B to A
Change every < to "less than", every <= to "less than or equal to", and so on.
Change every & to "and"
Change everything of the form
while CONDITION
to
loop as long as CONDITION is true
Change every "end" matching "if" to "done if", every "end" matching "while" to "done loop"
Change every entry of the form
function [out1, out2, ...] = NAME(in1, in2, ...)
to
create a procedure named NAME with input variables in1, in2, ... returning output variables out1, out2, ...
Not one of these changes are "standard" in any way, and are no more "pseudocode" than your existing code is: they are just syntax changes to get around the requirement that no MATLAB syntax can be used.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!