clear all close all clc R=287 %specifing R value f1=fopen(\'THERMO.dat\',\'r\'); %opening DAT file in code location fgetl(f1); %get line command %% getting the initial lines and global temperature Global=fgetl(f1); Global=strsplit(Global,\' \'); %gets us the string values only and deletes the spaces inbetween Global_ltemp=str2num(Global{2});…
Mohit Rajkumar Jain
updated on 22 Sep 2018
Project Details
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Read more Projects by Mohit Rajkumar Jain (8)
Nasa Data parsing
clear all close all clc R=287 %specifing R value f1=fopen(\'THERMO.dat\',\'r\'); %opening DAT file in code location fgetl(f1); %get line command %% getting the initial lines and global temperature Global=fgetl(f1); Global=strsplit(Global,\' \'); %gets us the string values only and deletes the spaces inbetween Global_ltemp=str2num(Global{2});…
22 Sep 2018 12:02 PM IST
Genetic algorithm
clear all close all clc %dividing x,y into 150 parts between the range 0 to 0.6 x=linspace(0,0.6,150); y=linspace(0,0.6,150); cases=50; %total cases =50 [xx yy]= meshgrid(x,y); for i=1:length(xx) for j=1:length(yy) input_vector(1)=xx(i,j); input_vector(2)=yy(i,j); f(i,j)=stalagmite(input_vector); end end options=gaoptimset(@ga);%intializing…
09 Aug 2018 10:12 AM IST
Curve fitting
clear all close all clc data = load(\'data\'); cp=data(:,2); temp= data(:,1); plot(temp,cp,\'linewidth\',3) hold on % from graph the point where high deflection is present is noted; %let us assume that value as temp=100 %splitting the data into 2 halves; from 300 to 1000 and the rest. for i=1:1000-300 temp1(i)=temp(i);…
30 Jul 2018 11:49 AM IST
otto cycle
clear all close all clc %input p1=101325 t1=500 t3=2300 bore=0.1 stroke=0.1 con_rod=0.2 cr=8 a=stroke/2 r=con_rod/a %calculating swept volume and clearance volume v_swept=(pi*bore^2)/4*stroke v_c=v_swept/(cr-1) %finding v,p,t and point 1,2,3,4 v1=v_swept+v_c v2=v_c p2=p1*cr^1.4 t2=p2*v2*t1/(p1*v1) con_c=p1*v1^1.4; %to…
26 Jul 2018 09:57 AM IST
Row and column vector in MATLAB
Row=[1;2;3;4] Column=[1 2 3 4]
26 Jul 2018 09:56 AM IST
flow over bicycle
clcclear allclose all%assuming all valuesVelocity=[5 10 15 20];dragCoef=0.5;Area=2;airDensity=3;DragForce=(airDensity*dragCoef*Area*Velocity.*Velocity)/2hold onplot(DragForce,Velocity,\'color\',\'r\')xlabel(\'Drag force\')dragCoef=[0.5 0.5 0.5 0.5]plot(DragForce,dragCoef,\'color\',\'b\')
26 Jul 2018 09:56 AM IST
Pendulum simulation in Matlab
clear all close all clc l=1; m=1; b=0.5; g=9.81; theta_0=[0;3]; t_span=linspace(0,20,500); [t,results]=ode45(@(t,theta) odeFunc(t,theta,b,g,l,m),t_span,theta_0) % plot(t,results(:,1)) % hold on % plot(t,results(:,2)) p = results(:,1) c=1; for i=1:length(t) x0=0; y0=0; x1=l*cos((1.5*pi)+p(i)); y1=l*sin((1.5*pi)+p(i)); plot([x0…
26 Jul 2018 09:54 AM IST
robotic arm challenge
clcclear allclose all l1=1;l2=2;t1=linspace(0,90,30);t2=linspace(0,90,30);ct=1for i=1:length(t1) tq1=t1(i); for j=1:length(t1) tq2=t2(j); x0=0; y0=0; x1=l1*cosd(tq1); y1=l1*sind(tq1); x2=x1+l2*cosd(tq2); y2=y1+l2*sind(tq2); %figure(ct) plot([x0 x1],[y0 y1],[x1 x2],[y1 y2]) %plot([x1 x2],[y1 y2],\'color\',\'b\') axis([-1…
14 Jul 2018 02:02 PM IST