What it is means 'Params = zeros(15,3); Params(15,3) = 1;'

Hi all...
Can anyone help me..what is the function of
Params = zeros(15,3); Params(15,3) = 1;
thanks

 Risposta accettata

create a 15 row and 3 column numeric array that is all zero, and assign the array to the variable named Params (which does not happen to be a special variable to MATLAB)
Then, assign 1 to the single array location which is at the 15th row at the 3rd column.

1 Commento

thanks...can i ask you another Q?Sir, if i don't want use function 'Params', what else function i can use?
thanks again

Accedi per commentare.

Più risposte (1)

Jan
Jan il 7 Giu 2013
Modificato: Jan il 7 Giu 2013
You can find this outby yourself: Simply omit the trailing semicolons to let Matlab show the results, when you type this inot the command line:
Params = zeros(15,3)
Params(15,3) = 1

4 Commenti

thanks..before this, i used semicolon, that's why no answer..can i ask you another question, if i don't want use 'Params',what another function i can use?
thanks again
@noor: I do not understand the question. "Params" is not a function, but the name of a variable. You can use any other name, which consists of less than 64 characters and does not start with a number or an underscore.
... and which consists of letters chosen from A to Z or a to z or the 10 digits or the underscore.
ooo..Thanks..because i got confuse here..now i understand..

Accedi per commentare.

Categorie

Scopri di più su Mathematics in Centro assistenza e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by