Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

urgent help please :::::( how can ı solve this ?

1 visualizzazione (ultimi 30 giorni)
astronot
astronot il 18 Mar 2016
Chiuso: MATLAB Answer Bot il 20 Ago 2021
mu=[1 1]';
p=0;
sigma=[1 2*p;2*p 4];
x= mu+sigma.*randn(1000,2);
this code gives me inner product error.
  2 Commenti
Adam
Adam il 18 Mar 2016
Putting "urgent" in a question title is more likely to just irritate people than persuade them to answer your question quickly. Everyone's work is urgent to themselves and not to anyone else. People will help if and when they can, irrespective of how urgent something is.

Risposte (2)

Torsten
Torsten il 18 Mar 2016
Modificato: Torsten il 18 Mar 2016
sigma is (2x2) and randn(1000,2) is (1000x2), so sigma*randn or sigma.*randn are not defined.
Best wishes
Torsten.

Guillaume
Guillaume il 18 Mar 2016
Modificato: Guillaume il 18 Mar 2016
  1. You need to be aware of the difference between element-wise multiplication and matrix multiplication
  2. Note the presence of i in the formula of the transformation. It is significant. To make x, you're either going to have to use a loop or bsxfun with some reshaping (with permute) of y.

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by