Concatenate vectors in cell array { } or matrix [ ] with coordinates

Hello World,
Is it possible to add a vector in a cell array with a specific coordinate and for which each number is an independant cell ?
When I use A{2,2}={4;5} or even A{2,2}=num2cell({4;5}) then I get
A= [] []
[] {2x1 cell}
and it's not what I want. Is there a way to get directly this following schema ? :
A= [] []
[] [4]
[] [5]
I would be curious to see the answer for a matrix [ ] too.
Thank you very much for your help. Dextro

 Accepted Answer

A(2:3,2) = {4;5}
And for a numeric/char/logical/...:
M(2:3,2) = [4;5]

2 Comments

Thank you Stephon Cobeldick. I knew it was an easy trick...
And of course for the matrix : A(2:3,2) = [4;5]

Sign in to comment.

More Answers (0)

Categories

Asked:

on 19 Jun 2018

Commented:

on 19 Jun 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!