0
I need an equation in correct format and code.

I have an equation that needs to be solved in scilab: with X varies from -1 to 1 for 1000 point and same with y. Can you give the correct format. I am getting one error all the time: Rows and columns do not match! This is the equation:

z=(E0*(-8/beta)*((X)/sqrt(((X)^2)+(y)^2))*(1/(beta*(sqrt(((X)^2)+(y)^2))))*((((beta*a*(sqrt(((X)^2)+(y)^2)))^2)/(2^2))-(((beta*a*(sqrt(((X)^2)+(y)^2)))^4)/((2^2)*(4^2)))+(((beta*a*(sqrt(((X)^2)+(y)^2)))^6)/((2^2)*(4^2)*(6^2))))-E0*(-8/beta)*cos(3*acos(((X)/sqrt(((X)^2)+(y)^2))))*(1/(beta*(sqrt(((X)^2)+(y)^2))))*((1/factorial(3))*(1/(2^3))*(((beta*a*(sqrt(((X)^2)+(y)^2)))^4)/(4))-(1/(factorial(1)*factorial(4)*(2^5)))*(((beta*a*(sqrt(((X)^2)+(y)^2)))^6)/(6))+(1/(factorial(2)*factorial(5)*(2^7)))*(((beta*a*(sqrt(((X)^2)+(y)^2)))^8)/(8))-(1/(factorial(3)*factorial(6)*(2^9)))*(((beta*a*(sqrt(((X)^2)+(y)^2)))^10)/(10))))/(E0*(-8/beta)*cos(phi_1)*(1/(beta*sin(the_1))))

where

The_1 = 1.570796327

Phi_1 = 0, 6.283185307

beta = 245.0540291

a = 0.1282

E0 = 1


Scilab 10-08-21, 1:49 a.m. hannabeprakash
1
Nobody can help debug the above code. The trick is that you have to learn how to develop a code that works correctly. If I were you, I will start defining variables, and build the above equation gradually, while checking that the equation is correctly formed (taking care of row, column conditions, etc.) at every step.
10-08-21, 8:07 p.m. kannan


Log-in to answer to this question.