How to separate values of string input into other variables???
Show older comments
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 Comment
osama saeed
on 30 Nov 2019
Accepted Answer
More Answers (0)
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!