統計
MATLAB Answers
3 質問
0 回答
ランク
of 171,134
コントリビューション
0 問題
0 解答
スコア
0
バッジ数
0
コントリビューション
0 投稿
コントリビューション
0 パブリック チャネル
平均評価
コントリビューション
0 ハイライト
平均いいねの数
Feeds
質問
How do I create a string for values
I have written this code to produce values from 1 - 3 with set probabilities: B = randi(3,1); P = B; for i = 1:50 ...
7年以上 前 | 3 件の回答 | 0
3
回答質問
I have to create a function y=D(m,n) where the value of y is m/n if n divides m evenly and n/m if m divides n evenly and otherwise y is zero. I used if and else if statements to define these but I wondering how to define the value of y as an integer.
function y=D1(m,n) if m/n== ? y=m/n; elseif n/m== ? y=n/m; else y=0; end end
8年以上 前 | 1 件の回答 | 0
1
回答質問
How do I create the follow array: [0 0 0 ... 0 1 2 ... 100 100 100], where there are 100 zeros on the left and 100 100's on the right? I must use the colon operator.
For previous questions I just used, for example, [0:0.01:1], to create the array from 0 to 1 using increments of 0.01. I just do...
8年以上 前 | 1 件の回答 | 0

