Skip to main content
1-Visitor
November 8, 2014
Question

I have some questions

  • November 8, 2014
  • 7 replies
  • 1970 views

%EC%BA%A1%EC%B2%981.PNG

I can get total QT if I define v, theta to any number.

But I want to get total QT that it include v, theta as "variable"

I search for method with my book, but I can't search for it.

so I posted this site to get advice.

could you help me?

7 replies

Werner_E
25-Diamond I
November 8, 2014

What do you expect Q.T to be???

  • a function of theta and v as you wrote? Then define it as such, delete the evaluation equal sign at the end and you can use that function as you like.
  • a neat 25 x 35 matrix of values? Then you will have to program that yourself. It was told you many many times here that you misuse ranges. You can't simply feed ranges in a function and expect a pretty formatted table as a result.
    As the ranges in your case are consecutive integers it may work to use them as matrix indices (results depends on the value of ORIGIN) but I strongly advise against doing so as your next question will be how to do it with decimal values in v and theta.
  • a ????. Then you will have to tell us.
jlee-21-VisitorAuthor
1-Visitor
November 8, 2014

I just want to get 1 x 25 in case of v and get 1 x 35 in case of "theta" each.

But I can't get these values if I don't manually define any number.

23-Emerald I
November 8, 2014

You need to understand that, like EXCEL, Mathcad defaults to angles in radians.

Unlike EXCEL, you do not convert to degrees by 180/pi. Instead, you assign a unit of degree, and Mathcad converts automatically.

I've reworked your sheet.

Werner_E
25-Diamond I
November 8, 2014

Here again in more detail why your expression fails. I bleched when I opened your sheet because its such a mess but finally I at least scrolled down to look at your problem.

Basically its because you used ranges as arguments when you call Q. If you do so, you can evaluate the function call and you will get what looks like a 875 x 1 vector. But because you used ranges, it is NOT a vector and Mathcad will not let you assign it to a variable. The error message is meaningless and not helpful.

BTW, the calculation will need an "infnite" time to finish. Have you ever tried to evaluate Q(q,2,19,35,25)? You will need a fast machine and alot of time!

You can use your ranges as indices of a matrix to create a nice matrix (rows are thetas, columns are v's) but this only works with the integer ranges you provided and is a method which sure is not recommended and I strongly advise against it.

I won't go into detail how to achieve a decent result using vectors for various reasons. Mainly because it seems that you are somehow resistant to advice. You still use your strange "iterations" for ar() and ar'() which are at least not accurate and I fear they are even erroneaous as I guess you cannot assume that a=a'. I guess a solve block as shown will do a better job. And then you still use ranges and a lot of people have already told you that this is not recommended. Mike has posted a couple of times routines which create vectors on the fly as easy a creating ranges.

So all I want to do is to finish up by showing why your sheet fails. The two methods shown below are both not recommended, though.

Because of the enormous calculation time I chosed much smaller ranges (it still takes quite long) for demonstration purposes.

11.png

jlee-21-VisitorAuthor
1-Visitor
November 8, 2014

I guess that it will be difficult process becasue I failed several time to change it.

so it make me force to choose "variable".

Anyway, thank you. I will try to change "variable" to "vector".