How to separate values of string input into other variables???
Ältere Kommentare anzeigen
i want to take a string input for some calculation like 5+3 or 500-127 using single line input command and i also want to store this in a single array separated by binary of these values and than into some other variables ...like if 500*45 than a=binary of 500 b=binary of * and c=binary of 45
CODE:
clc;
clear all;
close all;
f=input('calculation:','s');
disp(f);
x=dec2bin(f);
a=(x(1,:));
b=(x(2,:));
c=(x(3,:));
But im getting binary of first three character and characters are
1 Kommentar
osama saeed
am 30 Nov. 2019
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Data Type Conversion finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
