336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.



Naver

[matlab 명령창 지우기] :: clear 혹은 clear sth

[matlab x축 이름]  :: xlabel('x') 을 통해서 X Axis 이름을 설정할 수 있다.

[legend matlab]

[matlab 배열 요소 삭제] 

[matlab size(A,1)] :: Array A의 첫번째 오소의 사이즈를 구하는 명령어 (▶LINK)

[matlab에서 linespace 기능은?] 

y = linspace(-5,5);    -5~5까지 100개의 점으로 구성

y1 = linspace(-5,5,7)    -5~5까지 7개의 점으로 구성

[Matlab for문 (x,y) 출력] 

[hold off in matlab]




MathWorks 한국지사(02-6006-5100)

응시료 : 41만2500원



https://kr.mathworks.com/services/training/certification.html?s_v1=24539&elqem=2501558_EM_KR_DIR_18-07_MOE-EDU&elqTrackId=2a6b829a51c549e5b0872b2971e7308d&elq=a2b0d901dd014d2bab4fc0c5e72f9866&elqaid=24539&elqat=1&elqCampaignId=8248

Matlab자격증은 두가지 레벨로 나뉜다.

하나는 MATLAB Associate, 다른하나는 MATLAB Professional 이다.




11111

11111




https://kr.mathworks.com/services/training/certification/exam-questions.html


Sample exam questions


Test Your MATLAB Knowledge for the MathWorks Certified MATLAB Associate Exam


1.Which command will return the corner elements of a 10-by-10 matrix A?

(★아래 명령어를 그냥치면 안되고, A=[1 2 3 4; 5 6 7 8]의 형태로 elements를 선언후 쓸 수 있다.)

(10-by-10 matrix이므로 총 100개의 elements가 필요하지만, 여기선 4-by-2 matrix만으로도 충분하다.)

A.  A([1,end], [1,end])

B.  A([1,1], [end,end])

C.  A({[1,1], [1,end], [end,1], [end,end]})

D.  A(1:end, 1:end)

B는 4-by-4 matrix 형태로 전부 4만 출력

C는 "subsindex가 정의되지않았습니다." Error발생

D는 그대로 출력




2.Which command will return the fraction of positive numbers in a 10-by-10 matrix A?

어느 command가 will return할것인가 the fraction을 of 양수들의 in a 10-by-10 배열 A로 ?

A.  A(A > 0)/A

B.  numel(A > 0)/numel(A)

C.  sum(A > 0)/prod(size(A))

D.  nnz(A > 0)/numel(A)

(the fraction of positive numbers : 양의 소수)

(numel : Number of Elements)

(prod : Product of Array Elements)

(nnz : Number of NonZero ▶LINK)

B를 살짝 바꾼 numel(A(A>0)) 는 positive number인 element 갯수를 출력한다.

A=[1 2 3 4; 5 6 7 8]에서는 ans=8 을 출력한다.

how to check negative values are there or not in a matrix ?

A(A<0) 이라고 typing하면 negative elements들이 출력으로 나온다.

(A<0)만 typing하면 positive는 1로 negative는 0으로 출력된다.

numel(A(A>0)) 이라고 typing하면 number of negative elements가 출력되지만,

numel(A>0)는 그냥 전체 elements갯수가 출력되므로 적합하지 않다.

C에서 size(A)는 행렬의 크기이므로 A=[1 2 3 4; 5 6 7 8] 의 경우 ans = 2 4를 출력한다.

(2-by-4 matrix 이므로)

prod(size(A))는 prod(2x4)에 해당하므로 8을 출력한다.

A=[-1 -2 -3 -4; 5 6 7 8]로 바꾸주면

sum(A(A>0)) 는 26출력하지만, sum(A>0)은 1 1 1 1을 출력한다.

A=[1 2 3 4; 5 6 7 8] 의 경우

sum(A(A>0)) 는 36출력하지만, sum(A>0)은 2 2 2 2을 출력한다.

A=[-1 -2 3 -4; -5 6 7 -8]의 경우

sum(A(A>0)) 는 16출력하지만, sum(A>0)은 0 1 2 0을 출력한다.

이 결과로 미루어짐작해보니

sum(A(A>0))은 positive elements의 합이 되며,

sum(A>0)은 에서 positive elements의 갯수를 말한다.

D에서 nnz(A>0)는 0보다큰 elements의 갯수를 출력한다.

numel(A)는 전체 배열의 갯수를 출력한다.





3.Which command will delete (completely remove) the last cell of a cell-array C?

A.  C{end} = [ ];

B.  C[end] = [ ];

C.  C(end) = [ ];

D.  C{end} = {[ ]};

기본문법

Removing an element from a cell array ▶LINK

a{1} = 1        : element 1을 1번 자리에

a{2} = 2        : element 2를 2번 자리에

a{3} = 3        : element 3을 3번 자리에

여기까지하면 a = [1] [2] [3]

b = [1 2 3]    : 배열생성 b = 1 2 3 (a와 다른 형태임을 기억하자.)

b(2) = [ ]    : 배열에서 2를 뺀다. [1 3]만 남는다.

a{2} = [1] [ ] [3]

a(2) = [1] [3]        ({ }는 요소만 없애고 ( )를 쓰면 [ ]째로 없앤다.)

C(2,:) = []    :두번째 행 삭제(LINK)

C{2,2} = []    : 특정 cell의 내용학제 (2,2좌표의 element삭제)

.A=[1 2 3 4; 5 6 7 8] 이라고 배열을 생성할 경우

A(end)의 출력은 ans=8이다.

A(end) = [ ]; 를 계속 수행하면 the last cell(=마지막 셀)만 계속 삭제된다.




4.Which command will create a plot of acceleration vs. time 

(i.e., a vector time on the x-axis and a vector acceleration on the y-axis)?

어느 명령어가 will 만드는가 a plot을 of 가속도 vs 시간

(시간이 x축, 가속도가 y축)

A.  plot(time, acceleration)

B.  plot(acceleration, time)

C.  plot([time, acceleration])

D.  plot([acceleration, time])

▼Plot 참조 링크

https://kr.mathworks.com/help/matlab/ref/plot.html

https://kr.mathworks.com/videos/using-basic-plotting-functions-69018.html

>> N = 50;

>> y = randn(N,1);

>> y2 = filter([1 1]/2,1,y);

>> plot(y)        : 그래프 출력됨

>> t = linespace(0, .01, N);       : 0부터 0.01씩 N까지

>> plot(t, y)

>> title('My Plot')        :표에 제목 붙이기

>> xlabel('time')            :x축에 이름붙이기

>> ylabel('amplitude')    :y축에 이름붙이기

>> clc        : 명령창 지우기 clear시키기 command 기록들을

>> plot(t, y, t, y2)

>> legend('y', 'y2')

>> plot(t, y)

>> hold all

>> plot(t, y2)

>> hold off

>> plot(t, y)

>> clc        : 명령창 지우기 clear 시키기



5.Which command will give the standard deviation for each column in a 10-by-5 matrix Z?

A.  std(Z(:))

B.  std(std(Z))

C.  std(Z(1:5, :))

D.  std(Z)





Click here for data and code files necessary to complete the practice problems.

  1. The provided text file (readings.txt) contains a timestamp broken up into year, month, day, hour, minute, second, and timezone components, as well as a reading from a sensor. Write a script that reads the data from the file using the textscanfunction.

    The script must:
    • Convert the timestamps into single numeric serial date numbers stored in a variable named dates
    • Ignore the timezone component of the timestamp by not reading it into the workspace
    • Place numeric values for the readings in a single array of type double with a variable name of readings
  2. The provided data file (viewdata.mat) contains a 19-by-3 matrix viewdata with the following columns:
    1. Video Length - Length in minutes for the video
    2. Views - Number of times the video has been viewed
    3. Minutes Watched - Total amount of time viewers spent watching the video
    Write a MATLAB script to analyze the data to determine the effect of video length on viewer retention with the following steps:
    • Load the saved viewership data into the MATLAB workspace.
    • Create the column vector viewPct containing the percentage viewed for each variable according to the formula: Percentage viewed = (Minutes watched / Views) / (Video length).
    • Create vectors containing the percentage viewed for short (Video length < 1.5), medium (1.5 <= Video length <= 2.25), and long (Video length > 2.25) videos).
    • Calculate the average of the values contained in the vectors from the previous step, and store the results in the variables shortPctmedPct, and longPct respectively.
  3. The provided data file (TData.mat) contains temperature data reported by weather stations instance in time. The contents of the data file are:
    1. The x-coordinates of the weather station locations (in km) stored in the column vector x
    2. The y-coordinates of the weather station locations (in km) stored in the column vector y
    3. The temperature data corresponding to the station locations (in degrees C) stored in the column vector T

    Write a MATLAB script to load the data from the file and produce a contour plot similar to the one below with the temperature stations. Use the griddata function with 'v4' as the interpolation method to estimate the temperatures for the x-y spatial grid points.



    The plot must contain:
    • contours spanning -5 degrees C to 5 degrees C in 1 degree increments
    • a spatial extent of the contour plot corresponding to 0 < x < 675, 0 < y < 350; with a grid resolution (grid square size) of 1km-by-1km.
    • labels for the contours with the clabel function
    • markers for the weather station locations
  4. Create an anonymous function f which accepts a (possibly vector valued) numeric input and returns a (possibly vector valued) numeric output according to the mathematical formula f(x) = x^2 - sin(x). Use this function along with the fminsearchfunction to find the local minimum value near the initial value near x0 = 0.5. Store the local minimizing value and the corresponding function value in the variables xmin and ymin respectively.



  5. A function called viewImage accepts an image and a variable number of parameter name/value pairs as shown in the function heading:

    function viewImage (I, varargin)

    Write the validation code in the body of the function to produce an error message explaining the violation if any of the following conditions on the input arguments are not met:
    • If variable input options exist, they must exist in pairs
    • The names portion of the variable input must occur before the corresponding value. Names must be strings of the value 'zoom''rotate', or 'tilt'
    • The value portion for a variable input must be numeric

    Do not write any implementation beyond the code required to perform the validation.

  6. The provided script (diceSimulation.m) runs a simulation of rolling six, 6-sided dice and calculating the sum. The simulation is repeated 1,000,000 times to create a histogram of the probability distribution as shown below.



    The code produces the correct result, but can be improved to run faster. Rewrite the script such that the simulation produces the same results with 1,000,000 trials, a histogram of the results is created, and a faster execution time.

    The figure illustrates on result from running the script. Solutions should have a similar distribution.

  7. The provided script (LoadData.m) loads data from an impact simulation, and uses the plotyy function to plot position on the left y-axis and velocity on the right y-axis. Using the outputs from the plotyy function, modify the figure to make it look as shown in the figure below.



    The figure must contain:
    • an x-axis with a minimum value of 0 and a maximum value of 4
    • a plot of the position vector as a solid blue line
    • a left y-axis colored in blue with a minimum value of -5 and a maximum value of 5
    • a plot of the velocity vector as a dashed black line
    • a right y-axis colored in black with a minimum value of -0.5 and a maximum value of +0.5
    • a right y-axis colored in black with a minimum value of -0.5 and a maximum value of +0.5
    • a title reading "Impact Data" as shown in the figure
    • a legend in the top center of the axes with the correct label for each plot
  8. The provided graphical application (see screenshot below) plots a sine wave based on the provided amplitude and frequency using the equation y = amplitude*sin(2*pi*frequency*x) on the interval defined by [0 2*pi].



    Write the callback functions for the slider controls to update the plot. The callbacks must:
    • Update the plot with the new amplitude or frequency
    • Update the display of the amplitude and frequency values (tag names edtAmplitude and edtFrequency respectively.

    Additionally, display a plot with the default values for amplitude and frequency upon starting the application.


Posted by ElectricShock
:
BLOG main image
잡동사니들(지극히 개인취향인...) (다른글에도 댓글 부탁해요♥) You May Leave English Messages on GuestBook. by ElectricShock

공지사항

카테고리

분류 전체보기 (782)
Programming(=프로그래밍) (3)
MiDi (2)
Animation (4)
Blender (3D Graphic Program.. (10)
Blendtuts.com (Series) (1)
Blender 기초 팁들 (2)
Processing (디지털미디어과) (2)
Music (1)
Books in the world (0)
Communication(CAN, UART, et.. (12)
MCU Examples (PIC 기반) (7)
Transistor (1)
Mikro C Pro (11)
Mikro Pascal (1)
Proton IDE (0)
Robot (0)
Swift 3D (1)
Dummies Series (1)
All about Hacking (0)
제2 외국어 (1)
PIC 해외서적들 (3)
AVR (25)
PIC (MikroC) (MPLAB) (4)
Assembly (2)
ARM (3)
Arduino (26)
PSpice (1)
Proteus ISIS (14)
CodeVision (2)
FPGA (15)
MPLAB (24)
PCB (the Procedure) (15)
3D Printer (5)
PICKIT3 (6)
Matlab (11)
RaspBerry PI (15)
BeagleBone (1)
Android Studio (17)
졸업작품 (172)
Korea History (0)
Issue(사회) (73)
Multimeter 리뷰 (1)
Oscilloscope (1)
A (34)
B (19)
J (6)
C (32)
P (12)
T (37)
H (12)
I (12)
M (44)
R (5)
E (5)
F (2)
D (9)
O (2)
L (7)
S (9)
W (2)
V (6)
G (14)
Visual C++ or Visual Studio (2)
Android App Development (0)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백