I think you may want to install matlab mode fromt he
dotspacemacs/configuration-layers you can add the line:
(extra-langs :variables matlab-mode).
Maybe this is what you said you did already though.
I don't think you have to add a path to the .spacemacs file.
matlab-mode should just start up when you open a matlab file in emacs. And if for some reason it doesnt you can enable it with
SPC SPC matlab-mode.
As to those variables you have though (
matlab-shell-command), they should go in
dotspacemacs/user-config in the .spacemacs file.
Maybe you can put them in a hook with a function that initializes your matlab variables. The whole thing might look like this:
(defun dotspacemacs/user-config ()
(defun init-matlab ()
"Initializes my configuration for matlab mode."
(setq matlab-indent-function "")
(setq matlab-shell-command ""))
(add-hook 'matlab-mode-hook 'init-matlab)