How to multiply a scalar matrix with a matrix in for loop?

My scalar matrix is:
N=5;
I = eye(N+1);
disp(1/2 *I)
but when i multiply this matrix with a matrix which is obtained by a for loop . i am unable to get result what should i do? the code i have designed is as follows:
clc. clear all
N=5;
I = eye(N+1);
for t = i/N
H1= hermiteH(0:N, t);
disp((1/2 *I )* H1)
end

1 commentaire

What do you mean by 'I am unable to get a result'? If you get an error message then include it in full.

Connectez-vous pour commenter.

Réponses (1)

N=5;
I = eye(N+1);
for t = 1:N
H1= hermiteH(0:N, t);
disp((1/2 *H1 )* I)
end

1 commentaire

No A*B is not equal to B * A, I have to put values in an equation , so i have to display disp((1/2 I ) H1)

Connectez-vous pour commenter.

Catégories

En savoir plus sur MATLAB Mobile Fundamentals dans Centre d'aide et File Exchange

Tags

Aucun tag saisi pour le moment.

Question posée :

le 26 Avr 2017

Commenté :

le 26 Avr 2017

Community Treasure Hunt

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

Start Hunting!

Translated by