Message Boards Message Boards

0
|
3465 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Generate a list of values more efficiently?

Posted 5 years ago

Hello, Could any one please let me know how to make my code more general and efficient if I add more values of k because I have more numbers of k values not only 5 as in my code1, my original data is around 270 values of k. You can see the attachment (code 2), when I added one value of k (in Red Color), there is a problem appeared in Km, and Kp.

What is the change I have to do in the command of Km and Kp to get 6 values of m?

Thanks in advance!

Attachments:
POSTED BY: Ghady Almufleh
2 Replies

The problem seems to be your c.

Immediately before calculating Km look at

Dimensions[c]
Dimensions[BesselJ[4, a]]
Dimensions[BesselJ[4, b]]

You cannot multiply lists of different lenghts.

POSTED BY: Hans Dolhaine

Welcome to Wolfram Community! Please make sure you know the rules: https://wolfr.am/READ-1ST

The rules explain how to format your code properly. If you do not format code, it may become corrupted and useless to other members. Please EDIT your post and make sure code blocks start on a new paragraph and look framed and colored like this.

int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]

enter image description here

POSTED BY: Moderation Team
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract