フィルターのクリア

if i have two matrices A and B. the matrix A combination is 1x15 while matrix two combination is 1x450 and i wanna divide A by B but the dimensions are not equal.so how can i solve this probelm?

1 回表示 (過去 30 日間)
kafa=(A-B).^2
  1 件のコメント
waqas muhammad
waqas muhammad 2018 年 1 月 16 日
but sir, kafa=(a-b).^2 has again that probelm. Error using - Matrix dimensions must agree.
Error in prctc (line 3) kafa=(a-b).^2

サインインしてコメントする。

採用された回答

Birdman
Birdman 2018 年 1 月 16 日
One way:
B=reshape(B,30,15);
A./B
  3 件のコメント
Birdman
Birdman 2018 年 1 月 16 日
What do you plan to achieve by this?
(1:A-1:B)
waqas muhammad
waqas muhammad 2018 年 1 月 16 日
編集済み: waqas muhammad 2018 年 1 月 16 日
if i do kafa=(1:a./1:b). now it is giving me the result but it doesnot give me the plot. kafa versus pt while kafa is 1x3812 after the calculation of kafa=(1:a./1:b) but on the other hand pt is 1x450. but if i do the same method with kafa plot versus pt...plot(1:pt,1:kafa)...or plot(pt,kafa) then it doesnot give me the plot and it gives an error that Vectors must be the same lengths.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDiscrete Data Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by