필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

help plotting four different graphs in matlab and I need help to plot a graph for each function to save the code as a pdf

조회 수: 1 (최근 30일)
%Analyze these function over the range of 0 ≤ x ≤ 8.0
% 1. y(x)=6.0-0.5x
% 2. y(x)=0.0781*(x^2)+1
% 3. y(x)=2.12(x^(1/2))
% 4. y(x)=(1/35)(64x-x^3)
clc;
syms x;
y1 = 6.0-0.5*x;
Nx1 = x*y1;
A1 = int(y1, 0, 8);
%This are the coordinates of the centriod
Xc1 = (int(Nx1, 0, 8))/A1
Yc1 = (int((((y1)^2)/2), 0, 8))/A1
y2 = 0.0781*(x^2)+1;
Nx2 = x*y2;
A2 = int(y2, 0, 8);
%This are the coordinates of the centriod
Xc2 = (int(Nx2, 0, 8))/A2
Yc2 = (int((((y2)^2)/2), 0, 8))/A2
y3 = 2.12*(x^(1/2));
Nx3 = x*y3;
A3 = int(y3, 0, 8);
%This are the coordinates of the centriod
Xc3 = (int(Nx3, 0, 8))/A3
Yc3 = (int((((y3)^2)/2), 0, 8))/A3
y4 = (1/35)*(64*x-x^3);
Nx4 = x*y4;
A4 = int(y4, 0, 8);
%This are the coordinates of the centriod
Xc4 = (int(Nx4, 0, 8))/A4
Yc4 = (int((((y4)^2)/2), 0, 8))/A4

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by