Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Application Program Interviews:AutoCADBEA WeblogicBioinformaticsBizTalk ServerBug Tracking ToolsBugzillaClarify CRMCoding StandardsComputer Aided Design (CAD) DesignerCVSGIMPJMXLINQLoadRunnerMagentoMATLABMicrosoft AccessMicrosoft ExcelMicrosoft OfficeMicrosoft OutlookMicrosoft WordModel View Controller (MVC)OLAPOOADQuickbookRational RobotRDFSchemaSiebelSilkTestSVGTest PlanTesting ToolsUnity 3D DeveloperVRMLWCF SDKWPFXML DOMXPointer
Copyright © 2018. All Rights Reserved
MATLAB Interview Question:
Do you know how to Pre Allocate a Non Double matrix?
Submitted by: MuhammadPreallocating a block of memory for holding a non double matrix is memory efficient.
► It is faster to use the function 'repmat'.
► While allocating block of memory for a matrix, zeros are pre allocated to a matrix.
► The function to pre allocate memory is int8().
Ex: matrix = int8(zeros(100));
► Repmat function is used to create a single double matrix.
► Ex: matrix2 = repmat(int8(0), 100, 100);
► Thus non double matrix is pre allocated.
Submitted by: Muhammad
► It is faster to use the function 'repmat'.
► While allocating block of memory for a matrix, zeros are pre allocated to a matrix.
► The function to pre allocate memory is int8().
Ex: matrix = int8(zeros(100));
► Repmat function is used to create a single double matrix.
► Ex: matrix2 = repmat(int8(0), 100, 100);
► Thus non double matrix is pre allocated.
Submitted by: Muhammad
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.