#Terrain File Terrain.mat #Start Point (xs,ys) -4.8 4.0
From the code above I am trying to extract "-4.8" and save it as xs, and "4.0" saved as ys. I don't know how to tell matlab to look for the "#" that will be at the beginning of every category.
this is the project text file code please convert to project.text file for solving.
#This is a project file for MAE8 Spring 2014 #Terrain File Terrain.mat #Start Point (xs,ys) -4.8 4.0 #End Point (xe,ye) 4.8 -4.8 #Number of Way Points 2 #Way Points (xwp,ywp) -0.5 4.8 4.7 0.8
If all you need is that start point coordinates, then about the simplest is just
>> [xs ys]=textread('project.txt','%f %f', 1, ... 'headerlines',4,'commentstyle','shell'); >> disp([xs ys]) -4.8000 4.0000
If, otoh, you need the other info as well, then it's essentially the same presuming you'll do a little post-processing--
>> [xs ys]=textread('project.txt','%f %f', ... 'headerlines',4,'commentstyle','shell'); >> disp([xs ys]) -4.8000 4.0000 4.8000 -4.8000 2.0000 0 -0.5000 4.8000 4.7000 0.8000 >>
ix=find(ys(:,2)==0};
np=xs(3); *END*
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.