フィルターのクリア

n range between 1 to 7 and d's range between 1 to 100. how to solve it?

3 ビュー (過去 30 日間)
ABHISEK MOHANTY
ABHISEK MOHANTY 2015 年 2 月 9 日
コメント済み: Star Strider 2015 年 2 月 9 日
clc
clear all
n=[1:.0001:7];
d= ?? ;
[a]=d*n; display([a]

採用された回答

Star Strider
Star Strider 2015 年 2 月 9 日
I’m not certain what you want to do, but this may be one approach:
n = [1:.0001:7];
d = linspace(1, 100, length(n));
a = n.*d;
  2 件のコメント
ABHISEK MOHANTY
ABHISEK MOHANTY 2015 年 2 月 9 日
thanks....
Star Strider
Star Strider 2015 年 2 月 9 日
My pleasure!

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

その他の回答 (1 件)

Stephen23
Stephen23 2015 年 2 月 9 日
編集済み: Stephen23 2015 年 2 月 9 日
Try this:
>> n = 1:.0001:7;
>> d = linspace(1,100,numel(n));
And I suspect that you actually want to multiply with element-wise multiplication:
>> a = d.*n;
Depending on what kind of spacing you want you might like to look as colon and logspace .

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by