![photo](/responsive_image/150/150/0/0/0/cache/matlabcentral/profiles/18940122_1612353281918.jpg)
Mohammad Emaz Uddin
Followers: 0 Following: 0
Undergraduate student of Bangladesh University of Engineering and Technology on Department of Electrical and Electronic Engineering.
Statistics
0 Questions
1 Answer
RANK
89.851
of 297.080
REPUTATION
0
CONTRIBUTIONS
0 Questions
1 Answer
ANSWER ACCEPTANCE
0.00%
VOTES RECEIVED
0
RANK
of 20.424
REPUTATION
N/A
AVERAGE RATING
0.00
CONTRIBUTIONS
0 Files
DOWNLOADS
0
ALL TIME DOWNLOADS
0
RANK
of 157.839
CONTRIBUTIONS
0 Problems
0 Solutions
SCORE
0
NUMBER OF BADGES
0
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Feeds
Write a MATLAB script file that calculates the sum of first n natural numbers (the program could prompt the user for the number n). The program must use a “for” or “while” loop to accomplish this, and must NOT use the ready formula s = 1 2 n (n + 1).
clc; clear; close all; n= input('Enter numbers: '); sum=0; for i=1:1:n sum=sum+i; end disp (sum);
ongeveer 4 jaar ago | 0