第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

請(qǐng)問(wèn)在matlab中有 nominal()這個(gè)函數(shù)嗎?

請(qǐng)問(wèn)在matlab中有 nominal()這個(gè)函數(shù)嗎?

C PHP
慕桂英3389331 2022-04-15 18:11:28
matlab 中有 nominal()這個(gè)函數(shù)嗎?具體情況?
查看完整描述

1 回答

?
桃花長(zhǎng)相依

TA貢獻(xiàn)1860條經(jīng)驗(yàn) 獲得超8個(gè)贊

有!

【函數(shù)概述】
nominal
Class: nominal

Construct nominal categorical array
expand all in page
The nominal and ordinal array data types might be removed in a future release. To represent ordered and unordered discrete, nonnumeric data, use the MATLAB? categorical data type instead.
Syntax
B = nominal(A)
B = nominal(A,labels)
B = nominal(A,labels,levels)
B = nominal(A,labels,[],edges)

Description
B = nominal(A) creates a nominal array B from the array A. A can be numeric, logical, character, categorical, or a cell array of strings. nominal creates the levels of B from the sorted unique values in A, and creates default labels for them.
B = nominal(A,labels) labels the levels in B using the character array or cell array of strings labels. nominal assigns labels to levels in B in order according to the sorted unique values in A.
B = nominal(A,labels,levels) creates a nominal array with possible levels defined by levels. levels is a vector whose values can be compared to those in A using the equality operator. nominal assigns labels to each level from the corresponding elements of labels. If A contains any values not present in levels, the levels of the corresponding elements of B are undefined.
B = nominal(A,labels,[],edges) creates a nominal array by binning the numeric array A with bin edges given by the numeric vector edges. The uppermost bin includes values equal to the right-most edge. nominal assigns labels to each level in B from the corresponding elements of labels. edges must have one more element than labels.
By default, an element of B is undefined if the corresponding element of A is NaN (when A is numeric), an empty string (when A is character), or undefined (when A is categorical). nominal treats such elements as "undefined" or "missing" and does not include entries for them among the possible levels for B. To create an explicit level for such elements instead of treating them as undefined, you must use the levels input, and include NaN, the empty string, or an undefined element.
You may include duplicate labels in labels in order to merge multiple values in A into a single level in B.

【用法舉例】
Create and Label Nominal Arrays
Load the sample data.
load fisheriris;

Create a nominal array and display a summary of the data.
species = nominal(species);
summary(species)
setosa 50
versicolor 50
virginica 50

Create a nominal array from characters, and provide explicit labels.
colors1 = nominal({'r' 'b' 'g'; 'g' 'r' 'b'; 'b' 'r' 'g'},...
{'blue' 'green' 'red'})
colors1 =

red blue green
green red blue
blue red green

Create a nominal array from characters, and provide both explicit labels and an explicit order for display.
colors2 = nominal({'r' 'b' 'g'; 'g' 'r' 'b'; 'b' 'r' 'g'}, ...
{'red' 'green' 'blue'},{'r' 'g' 'b'})
colors2 =

red blue green
green red blue
blue red green

Create a nominal array from integer data, merging odd and even values into only two nominal levels. Provide explicit labels.
toss = nominal(randi([1 4],5,2),{'odd' 'even' 'odd' 'even'},1:4)
toss =

even odd
even even
odd odd
even even
odd even

查看完整回答
反對(duì) 回復(fù) 2022-04-19
  • 1 回答
  • 0 關(guān)注
  • 645 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)