Example Matrix setq 014

 

 

Description

If the setq function specifies a value that does not exist in the specified Matrix, the value will be dynamically installed. This example shows the setq function replacing the old value in the Vector with a new value.

 

Details

Sets the Matrix.

(define Fruits #(mat| "apple" "orange" "lemon")) Returns: #<Matrix123456>

Sets another Matrix.

(setq Food (new Matrix: 2 2 2 "apple" "orange" "lemon" "pear")) Returns: #<Matrix234567>

The newly set value "tomato" replaces the old value "apple".

(setq Fruits 0 "tomato") Returns: #<Matrix 123456>

Displays the contents of the modified Matrix.

Fruits[0] Returns: tomato

The newly set value "potato" replaces the old value "orange".

(setq Food 1 "potato") Returns: #<Matrix23456y>
(display Food) Returns: #(mat[2 2]| "apple" "potato" "lemon" "pear" )

The newly set value "meat" replaces the old value "lemon".

(setq Food 1 0 "meat") Returns: #<Matrix234567>
(display Food) Returns: #(mat[2 2]| "apple" "potato" "meat" "pear" )

Notes and Hints

The set function keyword may be used instead of setq.

 

Related Examples

Here are examples of the setq function at work.

BitVector setq 024 Boolean setq 016 Brick setq 029 Brick setq 28
Character setq 017 Date setq 019 Dictionary setq 007 Dictionary setq 008
Dictionary setq 009 Directory setq 010 Directory setq 011 FltVector setq 019
IntVector setq 020 Lambda setq 015 List setq 025 List setq 026
Matrix setq 014 NumVector setq 021 Number setq 018 ObjVector setq 022
ObjectRepository setq 027 PcodeVector setq 023 ShortVector setq 021 String setq 001
Structure setq 003 Structure setq 004 Structure setq 005 Structure setq 006
Symbol setq 001 Symbol setq 002 Vector setq 012 Vector setq 013
Void setq 015

 

Function Links

Here is the link to the current function used in this example.

setq

Here are a number of links to other related functions.

new(#void) define(#void)

 

Argument Types

Here are the links to the data types of the arguments used in this example.

Matrix Text

Here are a number of links to examples having similar argument types.

BitVector ref 027 BitVector vectorFill 007 Boolean boolean 001 Boolean setq 016
ByteVector isCharAlphabetic 003 ByteVector isCharAlphanumeric 003 ByteVector isCharLowercase 003 ByteVector isCharName 003
ByteVector isCharNumeric 003 ByteVector isCharUppercase 003 ByteVector isCharWhitespace 003 Character setq 017
Date hour 001 Date minute 001 Date month 001 Date second 001
Date setq 019 Date time 001 Date time 002 Date year 001
Dictionary isDictionary 001 Dictionary ref 007 Dictionary ref 008 Dictionary ref 009
Dictionary refAttributes 002 Dictionary refValues 002 Dictionary setq 009 Directory refAttributes 003
Directory refValues 003 Directory setq 011 FltVector ref 022 FltVector vectorFill 003
IntVector ref 023 IntVector vectorFill 004 Lambda ref 017 Lambda setq 015
Matrix addMethod 008 Matrix append 007 Matrix apply 005 Matrix apply 006
Matrix binaryInsert 005 Matrix binarySearch 005 Matrix binarySearch 006 Matrix cdr 007
Matrix cdr 008 Matrix compare 007 Matrix compareEQ 007 Matrix compareGE 007
Matrix compareLE 007 Matrix compareNE 007 Matrix comparison functions 007 Matrix copy 006
Matrix copy 007 Matrix count 005 Matrix defMethod 009 Matrix delete 009
Matrix insert 005 Matrix inside 005 Matrix isAtom 005 Matrix isEqual 005
Matrix isIdentical 005 Matrix isMatrix 001 Matrix isNumberMatrix 001 Matrix isObject 007
Matrix isType 009 Matrix length 008 Matrix makeGaussianMatrix 001 Matrix makeGramMatrix 001
Matrix map 006 Matrix map 007 Matrix mapc 005 Matrix matrixGaussianEliminate 001
Matrix matrixGaussianSubstitute 001 Matrix member 005 Matrix methodsOf 010 Matrix new 009
Matrix new 010 Matrix objectToMatrix 001 Matrix objectToNumMatrix 001 Matrix rank 001
Matrix ref 015 Matrix ref 016 Matrix remove 005 Matrix resize 005
Matrix reverse 002 Matrix send 008 Matrix setCdr 005 Matrix setLastCdr 005
Matrix setq 014 Matrix sizeof 007 Matrix sort 012 Matrix type 010
Matrix uniqueInsert 004 Matrix vectorFill 002 NumMatrix cdr 011 NumMatrix isNumberMatrix 001
NumMatrix makeGramMatrix 001 NumMatrix matrixGaussianEliminate 001 NumMatrix matrixGaussianSubstitute 001 NumMatrix ref 035
NumMatrix reverse 004 NumMatrix vectorFill 008 NumVector ref 024 NumVector vectorFill 005
Number setq 018 ObjVector ref 025 ObjVector vectorFill 006 PcodeVector ref 026
ShortVector ref 024 ShortVector vectorFill 005 String addMethod 001 String clean 001
String code 001 String defMethod 001 String defMethod 002 String downcase 001
String isChar 001 String isCharAlphabetic 001 String isCharAlphanumeric 001 String isCharLowercase 001
String isCharName 001 String isCharNumeric 001 String isCharUppercase 001 String isCharWhitespace 001
String isEqual 001 String isEqual 002 String isObject 001 String isString 001
String isText 001 String isType 001 String isType 002 String isType 003
String left 001 String length 001 String length 002 String methodsOf 001
String methodsOf 002 String methodsOf 003 String mid 001 String new 001
String parse 001 String ref 001 String ref 002 String replace 001
String rept 001 String right 001 String send 001 String sizeof 001
String string 001 String string 002 String string 003 String stringFill 001
String stringToBVector 001 String stringToBVector 002 String stringToBVector 003 String stringToVector 001
String stringToVector 002 String stringToVector 003 String stringToVector 004 String substitute 001
String substitute 002 String substring 001 String substring 002 String text 001
String trim 001 String type 001 String upcase 001 String upcase 002
String upcase 003 Structure defstruct 001 Structure ref 006 Structure refAttributes 001
Structure refValues 001 Symbol defMethod 003 Symbol isCharAlphabetic 002 Symbol isCharAlphanumeric 002
Symbol isCharLowercase 002 Symbol isCharName 002 Symbol isCharNumeric 002 Symbol isCharUppercase 002
Symbol isCharWhitespace 002 Symbol isObject 002 Symbol isSymbol 001 Symbol isType 004
Symbol length 003 Symbol send 002 Symbol sizeof 002 Symbol type 002
Vector ref 013 Vector ref 014 Vector refAttributes 004 Vector refValues 004
Vector setq 012 Vector setq 013 Vector vectorFill 001 Void compare 008
Void compareEQ 008 Void compareGT 008 Void compareNE 008 Void ref 017
Void setq 015 substringFill 001

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE