cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Mathcad prime3.0中的教程中编写for循环

nlan
1-Newbie

Mathcad prime3.0中的教程中编写for循环

你好,我在Mathcad prime3.0中的教程中编写for循环时,怎么没有循环进去。右上角有个入门,里面的教程里的编程教程任务3-1的4达不到5的结果,我得到的全是7.

}D4E`LP]IWQZ_%)3PP(@`RX.png

1 ACCEPTED SOLUTION

Accepted Solutions
nlan
1-Newbie
(To:nlan)

我找到问题 ,是vec的下标应该是运算符,不是数学里面的下标。

View solution in original post

3 REPLIES 3
nlan
1-Newbie
(To:nlan)

我找到问题 ,是vec的下标应该是运算符,不是数学里面的下标。

RichardJ
19-Tanzanite
(To:nlan)

There are two types of subscript in Mathcad: literal subscripts and vector subscripts. You get a literal subscript with Ctrl -, and it's just part of the variable name. It is cosmetic only. That's what you have in the loop, so vec_i is a different variable to the function argument vec. What you need is a vector subscript, which you get with [. Then i is an index into the variable vec, and the program will replace the first three values with 0.

Fred_Kohlhepp
23-Emerald I
(To:nlan)

To get the I subscript for vec, I think you used "ctrl -", instead of "["

"ctrl -"   

"["        

Top Tags