photo

Alvaro García


自 2015 起处于活动状态

Followers: 0   Following: 0

统计学

MATLAB Answers

5 个提问
0 个回答

排名
208,134
of 301,428

声誉
0

贡献数
5 个提问
0 个回答

回答接受率
40.0%

收到投票数
0

排名
 of 21,271

声誉
N/A

平均
0.00

贡献数
0 文件

下载次数
0

ALL TIME 下载次数
0

排名

of 174,497

贡献数
0 个问题
0 个答案

评分
0

徽章数量
0

贡献数
0 帖子

贡献数
0 公开的 个频道

平均

贡献数
0 个亮点

平均赞数

  • Thankful Level 1

查看徽章

Feeds

排序方式:

提问


for loop: Attempted to access y(2); index out of bounds because numel(y)=1. How to solve this error?
a=1; b=2; n=10; h=(b-a)/n; x(1)=a; for i=a:n x(i+1)=x(i)+h; y(i)=x(i).^3; area2(i)=((((y(i)-0)+(y(i+1)-0))/2)*x(...

11 years 前 | 1 个回答 | 0

1

个回答

提问


include a for loop instead of x=a:h:b (h=step size)?
a=1; b=2; n=10; h=(b-a)/n; x=a:h:b; y=x.^3; ya=a.^3; yb=b.^3; area = h/2*(ya+yb+2*(sum(y)-ya-yb)); disp(area) end ...

11 years 前 | 1 个回答 | 0

1

个回答

提问


Problem with for loop
areaneeded=3.75*100.1/100; %disp(areaneeded) %area needed for a 0.1% error a=1; b=2; for n=1:100; h=(b-a)/n...

11 years 前 | 1 个回答 | 0

1

个回答

提问


How can i run the for loop with a stepsize smaller than one?
I have this code: c=0:0.001:1; volume =0.75*pi*c-pi*c.^3; plot(c,volume) n=4; for i=1:4 fu...

11 years 前 | 2 个回答 | 0

2

个回答

提问


if condition not working, any ideas why?
% x=0:0.1:2; y=12*x.^2+10*x-28;%f(x) t=-13*x.^2+15*x+28;%g(x) h=25*x.^2-5*x-56; plot(x,y,'r',x,t,x,h,'b') title('interse...

11 years 前 | 1 个回答 | 0

1

个回答