필터 지우기
필터 지우기

how can we use dynamic memory allocation in matlab?

조회 수: 3 (최근 30일)
Imtiaz nabi
Imtiaz nabi 2022년 3월 29일
댓글: Imtiaz nabi 2022년 3월 29일
In other words what would be the closest functions to "calloc", "malloc", "free" etc in matlab?

답변 (1개)

Jan
Jan 2022년 3월 29일
malloc and calloc is performed by:
a = zeros(1, 1e6)
A free is useful under rare conditions also (huge arrays, memory exhausted):
clear('a')
  댓글 수: 1
Imtiaz nabi
Imtiaz nabi 2022년 3월 29일
thank you so much but I have a few other questions
Actually I am trying to replicate this section of the C code in matlab (see attached image)
here sc01 stands for 1 bit
SC08 stands for 8bit and SC16 stands for 16 bit data
now here are my questions
  1. what would be the closest command to the "short"
  2. can I use bitshift command for left shifting and bitshift command with negative values for right shifting? (for e.g. bitshift(24, -7) will shirt it 7 bits towards the right)
  3. what would be the closes command for this "0?0x01:0x00"

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by