From the number to make a fraction?
5 次查看(过去 30 天)
显示 更早的评论
Hello! I have the number 3408289, I need to make 34,08289 out of it, how can I do this in the matlab?
And then the task is to take that number away.
x=[3408289 3408354 3408678];
y=[14,02 14,19 14,15];
z=x-y;
2 个评论
回答(1 个)
madhan ravi
2019-7-30
X = zeros(size(y));
X(1:2:end) = fix(x / 1e5);
X(2:2:end) = rem(x , 1e5);
z = X-y
2 个评论
madhan ravi
2019-7-30
>> x=[3408289 3408354 3408678];
y=[14,02 14,19 14,15];
>> X = zeros(size(y));
X(1:2:end) = fix(x / 1e5);
X(2:2:end) = rem(x , 1e5);
z = X-y
z =
20 8287 20 8335 20 8663
>>
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!