استخراج تعداد المان های صفر در یک ماتریس در متلب zero_stat


function X = zero_stat( A )
%%A contain 0 and 1 element as an input Matrix
[k11 k12]=size(A); % iit calculate the number of column and row in A Matrix
k2=sum(A(:)==0); %it calculate the nubmber of Zero Element on A Matrix
k3=k11*k12; %it calculate the number of element in A Matrix
X=(k2/k3)*100; % it calculate the percentage of Zero element in A Matrix

end

 

 

#آباكوس-#آموزش آباكوس- مهندسي  مكانيك  انجام پروژه مكانيكي+#سمينار ساخت و توليد+جامدات #Matlab+ #Catia + Proteus  + شبيه سازي مدارات برقي با #پروتئوس+ تدريس خصوصي #كتيا+ سمينار ارشد + #ترجمه مقاله انگليسي به فارسي انجام پروژه‌هاي ارايه توليد فرمت مقالات كنفرانس‌ها، پوستر،# ISI، نوشتن پروپوزال رشته‌هاي فني، انجام پروژه‌هاي نقشه‌كشي ، طراحي با كتيا محيط‌هاي #sketch +draft-assemble+part design+static  analysis+machining milling+ #surface+ #sheetmetalبرنامه نويسي با متلب نمودارهاي cad cam nurbs+تدريس خصوصي و# گروهي كتيا+ انجام پروزه‌هاي تست غير مخرب- ترجمه سمينار

Coursera MATLAB Homework3

Write a function called sindeg that takes a matrix input called deg. The function returns a matrix

of the same size as deg with each of its elements containing the sine of the corresponding element

of deg. Note that the elements of deg are given in degrees and not radians. As a second output,

the function returns a scalar that contains the average value of the first output. You are not

allowed to use the sind and cosd built-in functions, but the use of any other function is

acceptable.

 

the output of Grader

hw4

Homework 4 Grader (v4.17.1.1)

Type the number of the problem that you would like to check

or choose the last option to check all problems and compute

a score and a submission code. (Nothing is submitted.)

0. EXIT

1. intquad

2. sindeg

3. simple_stats

4. odd_rms

5. fence

6. zero_stat

7. reverse_diag

8. sum3and5muls

9. ALL PROBLEMS (gives score and submission code)

Your selection: 2

NOTE: the grader will only determine if your

solution for Problem 2 is correct or not.

No score will be given.

Problem 2 (sindeg):

Feedback: Your function performed correctly for argument(s) [0 90 180]

Feedback: Your function performed correctly for argument(s) [30 60;90 120]

Feedback: Your function performed correctly for argument(s) 180

Feedback: Your function performed correctly for argument(s) [360;270;90]

Feedback: Your function performed correctly for argument(s) [284 344 181 181 378 24 197;212 586 144 57 467 463 67]

Feedback: Your function performed correctly for argument(s) [163 247 697 649 613 46 263 520 509 646;331 25 172 606 551 511 407 707 70 542;451 55 589 583 191 440 512 181 50 76;580 687 397 309 254 200 531 563 140 145]

Feedback: Your function performed correctly for argument(s) [318 158 606 8 167 130 682]

Feedback: Your function performed correctly for argument(s) [24;546;155]

Feedback: Your function performed correctly for argument(s) [488 666 73 688 511 288 248 160;714 5 577 142 686 493 279 36]

Feedback: Your function performed correctly for argument(s) [30 218 385 633 139;679 651 403 53 587;380 181 593 252 330;336 260 607 695 397;48 445 73 476 25]

Your solution is correct.

 

پاسخ در ادامه مطلب

 

 

#آباكوس-#آموزش آباكوس- مهندسي  مكانيك  انجام پروژه مكانيكي+#سمينار ساخت و توليد+جامدات #Matlab+ #Catia + Proteus  + شبيه سازي مدارات برقي با #پروتئوس+ تدريس خصوصي #كتيا+ سمينار ارشد + #ترجمه مقاله انگليسي به فارسي انجام پروژه‌هاي ارايه توليد فرمت مقالات كنفرانس‌ها، پوستر،# ISI، نوشتن پروپوزال رشته‌هاي فني، انجام پروژه‌هاي نقشه‌كشي ، طراحي با كتيا محيط‌هاي #sketch +draft-assemble+part design+static  analysis+machining milling+ #surface+ #sheetmetalبرنامه نويسي با متلب نمودارهاي cad cam nurbs+تدريس خصوصي و# گروهي كتيا+ انجام پروزه‌هاي تست غير مخرب- ترجمه سمينار

ادامه نوشته