Find Jobs
Hire Freelancers

Matlab to Fortran

$30-100 USD

Cancelled
Posted over 12 years ago

$30-100 USD

Paid on delivery
Few lines of Matlab code need to be converted to Fortran. As you will see the lines are simple statements ## Deliverables Matlab code %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C! Boundary Conditions - B.C. %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Er=0; % Radial Volt sigmar=10; % Radial Stress sigmart=0; % Shear Stress %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C! This is to read properly the knowns or inputs %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! b=cell(1,order); A=cell(1,order); TM=cell(1,order); x=zeros(NoEq,NoEq); % Applying concentrated-point (delta loads) @ theta0 theta0=pi/4; %c!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %c! Fourier Expansion %c! Eq1, Eq2 or u-r, sigma-r are multiplied by cos %C! Eq3, Eq4 or u-theta, sigma-r-theta are multiplied by sin %C! %c!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! for n=1:order b{n}(1,1)=(1/pi)*(-e33)*Er*cos(n*theta0);%Eq1 u-r r=Radial b{n}(2,1)=(1/pi)*(-e33)*Er*cos(n*theta0);%Eq2 sigma-r b{n}(3,1)=0; %Eq3= is always zero u-theta b{n}(4,1)=(1/pi)*e33s*Er*sin(n*theta0); %Eq4 sigma-r-theta b{n}(5,1)=(1/pi)*sigmar*cos(n*theta0); % Radial Stress Boundary b{n}(6,1)=(1/pi)*sigmart*sin(n*theta0); % Shear Stress Boundary end %c!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %c! Fourier Expansion %c! Eq1, Eq2 or u-r, sigma-r are multiplied by cos %C! Eq3, Eq4 or u-theta, sigma-r-theta are multiplied by sin %C! %c!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! for n=1:order %C! n can not be n=0 as t=pi/2*n %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C! %C! Layer 0 %C! %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C Evaluating A unknown coeficients in layer 0 %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! n0=0;n1=2; t=0;% cosines coefficients in radial while sines=0 x(m+1,n0+1)=Eq1_0s(n,t,gm,dyna0,A0,prp0,prpp); % Equation 2 in sigma-theta 0 layer x(m+2,n0+1)=Eq2_0s(n,t,gm,dyna0,A0,prp0,prpp); t=pi/(2*n);% cosines coefficients in radial while sines=0 % Equation 3 in sigma r-theta 0 layer x(m+3,n0+1)=Eq3_0s(n,t,gm,dyna0,A0,prp0,prpp); % Equation 4 in Dr 0 layer x(m+4,n0+1)=Eq4_0s(n,t,gm,dyna0,A0,prp0,prpp); %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C Evaluating F coeficients in layer 0 %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! % Equation 1 in sigma-r 0 layer t=0;% cosines coefficients in radial while sines=0 x(m+1,n0+2)=Eq1_0s(n,t,gm,dyna0,F0,prp0,prpp); % Equation 2 in sigma-theta 0 layer x(m+2,n0+2)=Eq2_0s(n,t,gm,dyna0,F0,prp0,prpp); % Equation 3 in sigma r-theta 0 layer t=pi/(2*n);% cosines coefficients in radial while sines=0 x(m+3,n0+2)=Eq3_0s(n,t,gm,dyna0,F0,prp0,prpp); % Equation 4 in Dr 0 layer x(m+4,n0+2)=Eq4_0s(n,t,gm,dyna0,F0,prp0,prpp); m=0;n0=0;n1=2; %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C! Layer 1 %C! %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C! Physical unknown A %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! % Equation 1 in sigma-r general layer t=0;% cosines coefficients in radial while sines=0 x(m+1,n1+1)=Eq1_1s(n,t,gm,dyna1,A1,prp1,prpp); % Equation 2 in sigma-theta general layer x(m+2,n1+1)=Eq2_1s(n,t,gm,dyna1,A1,prp1,prpp); % Equation 3 in sigma r-theta general layer t=pi/(2*n);% cosines coefficients in radial while sines=0 x(m+3,n1+1)=Eq3_1s(n,t,gm,dyna1,A1,prp1,prpp); % Equation 4 in Dr general layer x(m+4,n1+1)=Eq4_1s(n,t,gm,dyna1,A1,prp1,prpp); %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C Boundary Conditions (known surface traction) %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! t=0;% cosines coefficients in radial while sines=0 x(m+5,n1+1)=sigmarn(n,t,r2,dyna1,A1,prp1); t=pi/(2*n);% cosines coefficients in radial while sines=0 x(m+6,n1+1)=sigmartn(n,t,r2,dyna1,A1,prp1); %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C! Physical Equations Unknown C %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! % Equation 1 in sigma-r general layer t=0;% cosines coefficients in radial while sines=0 x(m+1,n1+2)=Eq1_1s(n,t,gm,dyna1,C1,prp1,prpp); % Equation 2 in sigma-theta general layer x(m+2,n1+2)=Eq2_1s(n,t,gm,dyna1,C1,prp1,prpp); % Equation 3 in sigma r-theta general layer t=pi/(2*n);% cosines coefficients in radial while sines=0 x(m+3,n1+2)=Eq3_1s(n,t,gm,dyna1,C1,prp1,prpp); % Equation 4 in Dr general layer x(m+4,n1+2)=Eq4_1s(n,t,gm,dyna1,C1,prp1,prpp); %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C Boundary Conditions (known surface traction) %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! t=0;% cosines coefficients in radial while sines=0 x(m+5,n1+2)=sigmarn(n,t,r2,dyna1,C1,prp1); t=pi/(2*n);% cosines coefficients in radial while sines=0 x(m+6,n1+2)=sigmartn(n,t,r2,dyna1,C1,prp1); %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C! Physical Equations Unknowns F %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! % Equation 1 in sigma-r general layer t=0;% cosines coefficients in radial while sines=0 x(m+1,n1+3)=Eq1_1s(n,t,gm,dyna1,F1,prp1,prpp); % Equation 2 in sigma-theta general layer x(m+2,n1+3)=Eq2_1s(n,t,gm,dyna1,F1,prp1,prpp); % Equation 3 in sigma r-theta general layer t=pi/(2*n);% cosines coefficients in radial while sines=0 x(m+3,n1+3)=Eq3_1s(n,t,gm,dyna1,F1,prp1,prpp); % Equation 4 in Dr general layer x(m+4,n1+3)=Eq4_1s(n,t,gm,dyna1,F1,prp1,prpp); %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C Boundary Conditions (known surface traction) %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! t=0;% cosines coefficients in radial while sines=0 x(m+5,n1+3)=sigmarn(n,t,r2,dyna1,F1,prp1); t=pi/(2*n);% cosines coefficients in radial while sines=0 x(m+6,n1+3)=sigmartn(n,t,r2,dyna1,F1,prp1); %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C! Physical Equations Unknown H %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! % Equation 1 in sigma-r general layer t=0;% cosines coefficients in radial while sines=0 x(m+1,n1+4)=Eq1_1s(n,t,gm,dyna1,H1,prp1,prpp); % Equation 2 in sigma-theta general layer x(m+2,n1+4)=Eq2_1s(n,t,gm,dyna1,H1,prp1,prpp); % Equation 3 in sigma r-theta general layer t=pi/(2*n);% cosines coefficients in radial while sines=0 x(m+3,n1+4)=Eq3_1s(n,t,gm,dyna1,H1,prp1,prpp); % Equation 4 in Dr general layer x(m+4,n1+4)=Eq4_1s(n,t,gm,dyna1,H1,prp1,prpp); %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %C Boundary Conditions (known surface traction) %C!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! t=0;% cosines coefficients in radial while sines=0 x(m+5,n1+4)=sigmarn(n,t,r2,dyna1,H1,prp1); t=pi/(2*n);% cosines coefficients in radial while sines=0 x(m+6,n1+4)=sigmartn(n,t,r2,dyna1,H1,prp1); TM{n}=x; A{n}=TM{n}\b{n}; end * * *This broadcast message was sent to all bidders on Wednesday Sep 28, 2011 5:10:04 PM: As some of you have noticed the program calls functions and subrountines. I already have these functions or subroutines in Fortran. The Matlab code is a development on previous code that I had it translated previously. This is an on going work. I code the programs in Matlab then translate them.
Project ID: 3590948

About the project

3 proposals
Remote project
Active 13 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average $167 USD for this job
User Avatar
See private message.
$300 USD in 2 days
5.0 (46 reviews)
5.9
5.9
User Avatar
See private message.
$100.30 USD in 2 days
4.6 (3 reviews)
3.0
3.0
User Avatar
See private message.
$100.30 USD in 2 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of CANADA
Orlando, Canada
5.0
105
Payment method verified
Member since May 30, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.