Create a program using Matlab that can solve Three Dimensional Space; Vectors, Partial Derivatives or any...

Free

80.2K

Verified Solution

Question

Mechanical Engineering

Create a program using Matlab that can solve Three DimensionalSpace; Vectors, Partial Derivatives or any of the topic in calculus3; show 5 examples please thankyou!! just use matlab for thesolution like the codes thankyou

Answer & Explanation Solved by verified expert
4.1 Ratings (643 Votes)

2-d functions
:
>> [x,y]=meshgrid(-1:0.1:1,-1:0.1:1);
>> z=5*x.^2+3*y.^2;
>> contour(x,y,z);
>> prism;
>> mesh(x,y,z)
>> surf(x,y,z)
>> view([10 30])
>> view([0 90])

  

2D Fourier transform intensity

echo on

colormap(hsv);

x=zeros(32);

x(13:20,13:20)=ones(8);

mesh(x)

pause % strike a key

y=fft2(x);

z=real(sqrt(y.^2));

mesh(z)

pause

w=fftshift(z);

surf(w)

pause

contour(log(w+1))

prism

pause

plot(w(1:32,14:16))

title(’fft’)

xlabel(’frequency’)

ylabel(’modulus’)

grid

echo off

Create file alpha.dat . Then:
>> fid=fopen(’alpha.dat’,’r’);
>> a=fread(fid,’uchar’,0)+4;
>> fclose(fid);
>> fid=fopen(’beta.dat’,’w’);
>> fwrite(fid,a,’uchar’);
>> fclose(fid);
>> !cat beta.dat

x est = 7.0;

delta = 0.1;

while(delta > 1.0e-4)

x=x est-delta:delta/10:x est+delta;

fplot(’eqn’,[min(x) max(x)]);

grid;

disp(’mark position of root with mouse button’)
[x est,y est] = ginput(1)
delta = delta/10;
end


Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students