Executable Generated not Working when .m File is

조회 수: 6 (최근 30일)
Gabriel
Gabriel 2025년 3월 24일
댓글: Walter Roberson 2025년 3월 25일
Hello,
I have a matlab script that I am using that works when using the command line like so.
I created an executable out of said file and inputted my parameters like this
The parameters are all the same and I made sure the runtime compiler I have installed is the same as the version I am using to run the script. How come this error is encountered from the executable? I apologize for including the error message in a picture I just had to include the input parameters as well.
Best,
Gabriel
  댓글 수: 1
Gabriel
Gabriel 2025년 3월 24일
for extra reference I used the mcc -m <matlab file> command to create the executable

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

답변 (2개)

Steven Lord
Steven Lord 2025년 3월 24일
See the section titled "Handle Input Arguments in MATLAB" on this documentation page. Those inputs are being passed into the application as text data not numbers by default.

Walter Roberson
Walter Roberson 2025년 3월 24일
You have coded an algebraic matrix multiplication, the * operator.
Unless you are deliberately doing linear algebra work, chances are high that instead you wanted the element-by-element multiplication operator, .* (period asterisk together)
  댓글 수: 1
Gabriel
Gabriel 2025년 3월 24일
I understand the error. I am more confused in why this error would present itself with the executable and not the matlab script. But, to fix the error on this line 28
total_num_samples_in_file = ((num_rx_channels * num_samples_per_chirp) + total_sideband_samples) * num_chirps_per_frame * num_frames;
I just substitute the * with .*?

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

카테고리

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

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by