Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Using a variable in a different function in MATLAB

7 vues (au cours des 30 derniers jours)
Omer Acil
Omer Acil le 23 Mai 2020
Clôturé : MATLAB Answer Bot le 20 Août 2021
Hello everyone;
I coded a function which you put a word inside and encrypts it. Now I am coding an another fucntion which decrpyts it but since these functions are not in the same edior I can not use the same word it does not recognizes it
function encStr = encrypt(s,key)
prompt='Enter message to be encrypted: ';
s=input(prompt,'s');
key=input('Enter the key: ');
a=char(s+key);
This is a part of my first function.
Thanks!
  1 commentaire
Stephen23
Stephen23 le 23 Mai 2020
The simplest and best solution is to pass the data in an output argument.

Réponses (0)

Cette question est clôturée.

Produits


Version

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by