sample exam questions -凯发k8网页登录

test your matlab knowledge for the mathworks certified matlab associate exam

which command will return the corner elements of a 10-by-10 matrix a?

a.  a([1,end], [1,end])
b.  a([1,1], [end,end])
c.  a({[1,1], [1,end], [end,1], [end,end]})
d.  a(1:end, 1:end)

which command will return the fraction of positive numbers in a 10-by-10 matrix a?

a.  a(a > 0)/a
b.  numel(a > 0)/numel(a)
c.  sum(a > 0)/prod(size(a))
d.  nnz(a > 0)/numel(a)

which command will delete (completely remove) the last cell of a cell-array c?

a.  c{end} = [];
b.  c[end] = [];
c.  c(end) = [];
d.  c{end} = {[]};

which command will create a plot of acceleration vs. time (i.e., a vector time on the x-axis and a vector acceleration on the y-axis)?

a.  plot(time, acceleration)
b.  plot(acceleration, time)
c.  plot([time, acceleration])
d.  plot([acceleration, time])

which command will give the standard deviation for each column in a 10-by-5 matrix z?

a.  std(z(:))
b.  std(std(z))
c.  std(z(1:5, :))
d.  std(z)

网站地图