close
Blogtrottr
批踢踢實業坊 ask 板
 
[請問] Matlab一問
Jun 1st 2014, 18:15, by currycc23

作者currycc23 (curry)

看板ask

標題[請問] Matlab一問

時間Sun Jun 1 18:15:29 2014

用Matlab有沒有更方便的方法達到下面兩件事 1.v = [1 2 3 4 5 6]; 某function(v) = [1 -2 3 -4 5 -6] 雖然我有想到使用以下方法達到 v .* repmat([1 -1], 1, 6/2) = [1 2 3 4 5 6] 但是以下這件事就不容易這樣做 2.u = [1 2 3 4 5 6 7]; 某function(u) = [1 -2 3 -4 5 6 -7] 請問有更快的方法可以達到 使某向量一正一負的結果嗎 (盡量不要是for迴圈) -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.114.236.156 ※ 文章網址: http://www.ptt.cc/bbs/ask/M.1401617731.A.625.html

wxtab019:如果有一堆陣列大小一樣的要做 就寫個對角線矩陣去乘就好 06/01 18:22

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜

    yisoajkls 發表在 痞客邦 留言(0) 人氣()