Tarun Sangwan
Followers: 0 Following: 0
統計
MATLAB Answers
0 質問
3 回答
ランク
of 153,912
コントリビューション
0 問題
0 解答
スコア
0
バッジ数
0
コントリビューション
0 投稿
コントリビューション
0 パブリック チャネル
平均評価
コントリビューション
0 ハイライト
平均いいねの数
Feeds
回答済み
write a function called palindrome that takes one input argument a char vector and recursively determine whether that argument is a palindrome you are not allowed to use loops not built in function like srtcmp etc. the function returns true or false
function p = palindrome(n) if length(n)/2<1 p = 2 else p = n(1) == n(end) p = [p palindrome(n(2:end-1))] end...
write a function called palindrome that takes one input argument a char vector and recursively determine whether that argument is a palindrome you are not allowed to use loops not built in function like srtcmp etc. the function returns true or false
function p = palindrome(n) if length(n)/2<1 p = 2 else p = n(1) == n(end) p = [p palindrome(n(2:end-1))] end...
8ヶ月 前 | 0
回答済み
Write a MATLAB script file that calculates the sum of first n natural numbers (the program could prompt the user for the number n). The program must use a “for” or “while” loop to accomplish this, and must NOT use the ready formula s = 1 2 n (n + 1).
%% using cell method function b = addds(n) g = cell(1,n) for i = 1:n g{1,i} = i end b = sum(g) %%using recurssion fu...
Write a MATLAB script file that calculates the sum of first n natural numbers (the program could prompt the user for the number n). The program must use a “for” or “while” loop to accomplish this, and must NOT use the ready formula s = 1 2 n (n + 1).
%% using cell method function b = addds(n) g = cell(1,n) for i = 1:n g{1,i} = i end b = sum(g) %%using recurssion fu...
8ヶ月 前 | 0
回答済み
How can I fix propagation speed error using Simscape Power System?
propogation time=distance/propagation speed(commonly reffered to speed of light) if there is propagation error you must check v...
How can I fix propagation speed error using Simscape Power System?
propogation time=distance/propagation speed(commonly reffered to speed of light) if there is propagation error you must check v...
2年以上 前 | 1