Closed
Description
Closely related to #52 but it might be nice if there was a sort of translation table for people coming from Matlab:
Matlab | arrayfire-rust |
---|---|
a = zeros(3, 4) |
let mut a = constant::<f32>(0.0, Dim4::new(&[3, 4, 1, 1])); |
b = a * 2 |
let mut b = a * 2.0f32; |
c = 0:10 |
let mut c = range::<f32>(Dim4::new(&[10, 1, 1, 1]), 0); |
d = (0:10)' |
let mut d = range::<f32>(Dim4::new(&[1, 10, 1, 1]), 1); |
e = d * c |
let mut e = d * c |
f = 1 - e |
??? |
g = max(c, 5) |
??? |
g(2:4) = 4 |
??? |