Author: PuTI
unexpected axes orientation in volshow()
Matlab documentation recommends using volshow() to display nifti-format images. volshow() does NOT map the indices i,j,k to the x,y,z axes, contrary to the nifti format specification. Have others noticed this? Do you see it as a problem? Could this cause medical scans to display in mirror image from what they should be?
The nifti format specification (nifti1.h, here) says that the indices i,j,k in V(i,j,k) map to x,y,z respectively, by default. (This is called Method 1 in lines 1038-1040 of nifti1.h.) Since I have not specified otherwise, I expect the default method to be used. Furthermore, if I do specify a mapping, using the an affine transform with the identity matrix, i,j,k should map to x,y,z respectively, but they do not. This method is called Method 3 in lines 1101-1103 of the nifti1.h specification. In case you’re wondering, the nifti1.h file also explains at lines 1008-1011 that the first, second,third array indices (i,j,k) should change fastest, medium, slowest respectively, as the array is stored in memory. And that is how Matlab array indices work.
Whether I use Method 1 or 3, index i maps to y and index j maps to x, contrary to expectation.
The code below demonstrates this by making and plotting a 3D scan. The volume V is 99x99x99. It has three lines from the center leading out to the centers of the imax face, the jmax face, and the kmax face. At the max end of each line, there are different size squares, to allow us to tell which is which. The imax face has a small square, the jmax face has a large square, and the kmax face has a medium square. I expect these to be at the +x, +y, and +z axes, respectively, but the large and small are reversed (x-y) from what I expect. This is not just a rotation of the data, it is a reflection, since data expected at +x and +y are flipped. See below.
Other things I’ve tried:
Write the volume to a nifti file, then read it in, then display it. Same result.
Define tform=affinetform3d(eye(4)); and use it: volshow(V,Transformation=tform);. Same result.
I realize that I can use an affine transformation (reflection) S=[0,1,0,0; 1,0,0,0; 0,0,1,0; 0,0,0,1] to make this look like I expected. But I think I shouldn’t have to, or it should be documented.
Since volshow() does not display in Matlab Answers, I have attached a screenshot of the displayed volume that results from the code below.
imax=99; jmax=99; kmax=99; % volume dimensions
V=zeros(imax,jmax,kmax); % allocate array
% draw line from cube center to center of imax face
V(50:imax,50,50)=ones(50,1,1);
% draw line from cube center to center of jmax face
V(50,50:jmax,50)=ones(1,50,1);
% draw line from cube center to center of kmax face
V(50,50,50:kmax)=ones(1,1,50);
% small (9×9) square at center of imax face (imax,jmid,kmid)
V(imax,46:54,46:54)=ones(1,9,9);
% large (21×21) square at center of jmax face (imid, jmax, kmid)
V(40:60,jmax,40:60)=ones(21,1,21);
% medium (15×15) square at center of kmax face (imid, jmid, kmax)
V(43:57,43:57,kmax)=ones(15,15,1);
% Display simulated scan
volshow(V);Matlab documentation recommends using volshow() to display nifti-format images. volshow() does NOT map the indices i,j,k to the x,y,z axes, contrary to the nifti format specification. Have others noticed this? Do you see it as a problem? Could this cause medical scans to display in mirror image from what they should be?
The nifti format specification (nifti1.h, here) says that the indices i,j,k in V(i,j,k) map to x,y,z respectively, by default. (This is called Method 1 in lines 1038-1040 of nifti1.h.) Since I have not specified otherwise, I expect the default method to be used. Furthermore, if I do specify a mapping, using the an affine transform with the identity matrix, i,j,k should map to x,y,z respectively, but they do not. This method is called Method 3 in lines 1101-1103 of the nifti1.h specification. In case you’re wondering, the nifti1.h file also explains at lines 1008-1011 that the first, second,third array indices (i,j,k) should change fastest, medium, slowest respectively, as the array is stored in memory. And that is how Matlab array indices work.
Whether I use Method 1 or 3, index i maps to y and index j maps to x, contrary to expectation.
The code below demonstrates this by making and plotting a 3D scan. The volume V is 99x99x99. It has three lines from the center leading out to the centers of the imax face, the jmax face, and the kmax face. At the max end of each line, there are different size squares, to allow us to tell which is which. The imax face has a small square, the jmax face has a large square, and the kmax face has a medium square. I expect these to be at the +x, +y, and +z axes, respectively, but the large and small are reversed (x-y) from what I expect. This is not just a rotation of the data, it is a reflection, since data expected at +x and +y are flipped. See below.
Other things I’ve tried:
Write the volume to a nifti file, then read it in, then display it. Same result.
Define tform=affinetform3d(eye(4)); and use it: volshow(V,Transformation=tform);. Same result.
I realize that I can use an affine transformation (reflection) S=[0,1,0,0; 1,0,0,0; 0,0,1,0; 0,0,0,1] to make this look like I expected. But I think I shouldn’t have to, or it should be documented.
Since volshow() does not display in Matlab Answers, I have attached a screenshot of the displayed volume that results from the code below.
imax=99; jmax=99; kmax=99; % volume dimensions
V=zeros(imax,jmax,kmax); % allocate array
% draw line from cube center to center of imax face
V(50:imax,50,50)=ones(50,1,1);
% draw line from cube center to center of jmax face
V(50,50:jmax,50)=ones(1,50,1);
% draw line from cube center to center of kmax face
V(50,50,50:kmax)=ones(1,1,50);
% small (9×9) square at center of imax face (imax,jmid,kmid)
V(imax,46:54,46:54)=ones(1,9,9);
% large (21×21) square at center of jmax face (imid, jmax, kmid)
V(40:60,jmax,40:60)=ones(21,1,21);
% medium (15×15) square at center of kmax face (imid, jmid, kmax)
V(43:57,43:57,kmax)=ones(15,15,1);
% Display simulated scan
volshow(V); Matlab documentation recommends using volshow() to display nifti-format images. volshow() does NOT map the indices i,j,k to the x,y,z axes, contrary to the nifti format specification. Have others noticed this? Do you see it as a problem? Could this cause medical scans to display in mirror image from what they should be?
The nifti format specification (nifti1.h, here) says that the indices i,j,k in V(i,j,k) map to x,y,z respectively, by default. (This is called Method 1 in lines 1038-1040 of nifti1.h.) Since I have not specified otherwise, I expect the default method to be used. Furthermore, if I do specify a mapping, using the an affine transform with the identity matrix, i,j,k should map to x,y,z respectively, but they do not. This method is called Method 3 in lines 1101-1103 of the nifti1.h specification. In case you’re wondering, the nifti1.h file also explains at lines 1008-1011 that the first, second,third array indices (i,j,k) should change fastest, medium, slowest respectively, as the array is stored in memory. And that is how Matlab array indices work.
Whether I use Method 1 or 3, index i maps to y and index j maps to x, contrary to expectation.
The code below demonstrates this by making and plotting a 3D scan. The volume V is 99x99x99. It has three lines from the center leading out to the centers of the imax face, the jmax face, and the kmax face. At the max end of each line, there are different size squares, to allow us to tell which is which. The imax face has a small square, the jmax face has a large square, and the kmax face has a medium square. I expect these to be at the +x, +y, and +z axes, respectively, but the large and small are reversed (x-y) from what I expect. This is not just a rotation of the data, it is a reflection, since data expected at +x and +y are flipped. See below.
Other things I’ve tried:
Write the volume to a nifti file, then read it in, then display it. Same result.
Define tform=affinetform3d(eye(4)); and use it: volshow(V,Transformation=tform);. Same result.
I realize that I can use an affine transformation (reflection) S=[0,1,0,0; 1,0,0,0; 0,0,1,0; 0,0,0,1] to make this look like I expected. But I think I shouldn’t have to, or it should be documented.
Since volshow() does not display in Matlab Answers, I have attached a screenshot of the displayed volume that results from the code below.
imax=99; jmax=99; kmax=99; % volume dimensions
V=zeros(imax,jmax,kmax); % allocate array
% draw line from cube center to center of imax face
V(50:imax,50,50)=ones(50,1,1);
% draw line from cube center to center of jmax face
V(50,50:jmax,50)=ones(1,50,1);
% draw line from cube center to center of kmax face
V(50,50,50:kmax)=ones(1,1,50);
% small (9×9) square at center of imax face (imax,jmid,kmid)
V(imax,46:54,46:54)=ones(1,9,9);
% large (21×21) square at center of jmax face (imid, jmax, kmid)
V(40:60,jmax,40:60)=ones(21,1,21);
% medium (15×15) square at center of kmax face (imid, jmid, kmax)
V(43:57,43:57,kmax)=ones(15,15,1);
% Display simulated scan
volshow(V); nifti, volshow, medical image MATLAB Answers — New Questions
Matlab issue with Jetpack Jetson AGX Orin
I am having a problem detecting cameras in my jetson AGX orin. On the jetson itself, it looks fine. When i plug a camera into the USB, it shows up fine in the matlab window. However I am using these cameras:
https://www.e-consystems.com/nvidia-cameras/jetson-agx-orin-cameras/ar0234-fhd-gmsl2-global-shutter-camera.asp
Checking for CUDA availability on the Target…
Checking for ‘nvcc’ in the target system path…
Checking for cuDNN library availability on the Target…
Checking for TensorRT library availability on the Target…
Checking for prerequisite libraries is complete.
Gathering hardware details…
Checking for third-party library availability on the Target…
Gathering hardware details is complete.
Board name : NVIDIA Jetson AGX Orin Developer Kit
CUDA Version : 12.6
cuDNN Version : 9.3
TensorRT Version : 10.
GStreamer Version : 1.20.3
V4L2 Version : 1.22.1-2build1
SDL Version : 1.2
OpenCV Version : 4.8.0
Available Webcams :
Available GPUs : Orin
Available Digital Pins : 7 11 12 13 15 16 18 19 21 22 23 24 26 29 31 32 33 35 36 37 38 40
I believe i’m running jetpack 6.
getCameraList(hwobj)
Camera Name Video Device Available Resolutions Pixel Formats
______________________________ _____________ ________________________________________ _____________
"vi-output, ecam_gmsl 9-0044" "/dev/video0" "[1280 720],[1920 1080],[1920 1200]" "UYVY,NV16"
"vi-output, ecam_gmsl 10-0043" "/dev/video1" "[1280 720],[1920 1080],[1920 1200]" "UYVY,NV16"
"vi-output, ecam_gmsl 10-0044" "/dev/video2" "[1280 720],[1920 1080],[1920 1200]" "UYVY,NV16"
when i try to run the folloiwng command ige tan error:
cam = camera(hwobj, ‘vi-output, ecam_gmsl 9-0044’, [1280 720]);
img = snapshot(cam);
Error using nvidiaboard/recvResponse
Unable to pull the frame.
Error in nvidiaio.internal.camera/open (line 262)
obj.ConnectedCamera = obj.NvObj.recvResponse() + 1;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nvidiaio.internal.camera (line 109)
obj.open();
^^^^^^^^^^^
Error in nvidiaboard/camera
this shows up no matter what camera i use, and whatever resoluition I use.I am having a problem detecting cameras in my jetson AGX orin. On the jetson itself, it looks fine. When i plug a camera into the USB, it shows up fine in the matlab window. However I am using these cameras:
https://www.e-consystems.com/nvidia-cameras/jetson-agx-orin-cameras/ar0234-fhd-gmsl2-global-shutter-camera.asp
Checking for CUDA availability on the Target…
Checking for ‘nvcc’ in the target system path…
Checking for cuDNN library availability on the Target…
Checking for TensorRT library availability on the Target…
Checking for prerequisite libraries is complete.
Gathering hardware details…
Checking for third-party library availability on the Target…
Gathering hardware details is complete.
Board name : NVIDIA Jetson AGX Orin Developer Kit
CUDA Version : 12.6
cuDNN Version : 9.3
TensorRT Version : 10.
GStreamer Version : 1.20.3
V4L2 Version : 1.22.1-2build1
SDL Version : 1.2
OpenCV Version : 4.8.0
Available Webcams :
Available GPUs : Orin
Available Digital Pins : 7 11 12 13 15 16 18 19 21 22 23 24 26 29 31 32 33 35 36 37 38 40
I believe i’m running jetpack 6.
getCameraList(hwobj)
Camera Name Video Device Available Resolutions Pixel Formats
______________________________ _____________ ________________________________________ _____________
"vi-output, ecam_gmsl 9-0044" "/dev/video0" "[1280 720],[1920 1080],[1920 1200]" "UYVY,NV16"
"vi-output, ecam_gmsl 10-0043" "/dev/video1" "[1280 720],[1920 1080],[1920 1200]" "UYVY,NV16"
"vi-output, ecam_gmsl 10-0044" "/dev/video2" "[1280 720],[1920 1080],[1920 1200]" "UYVY,NV16"
when i try to run the folloiwng command ige tan error:
cam = camera(hwobj, ‘vi-output, ecam_gmsl 9-0044’, [1280 720]);
img = snapshot(cam);
Error using nvidiaboard/recvResponse
Unable to pull the frame.
Error in nvidiaio.internal.camera/open (line 262)
obj.ConnectedCamera = obj.NvObj.recvResponse() + 1;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nvidiaio.internal.camera (line 109)
obj.open();
^^^^^^^^^^^
Error in nvidiaboard/camera
this shows up no matter what camera i use, and whatever resoluition I use. I am having a problem detecting cameras in my jetson AGX orin. On the jetson itself, it looks fine. When i plug a camera into the USB, it shows up fine in the matlab window. However I am using these cameras:
https://www.e-consystems.com/nvidia-cameras/jetson-agx-orin-cameras/ar0234-fhd-gmsl2-global-shutter-camera.asp
Checking for CUDA availability on the Target…
Checking for ‘nvcc’ in the target system path…
Checking for cuDNN library availability on the Target…
Checking for TensorRT library availability on the Target…
Checking for prerequisite libraries is complete.
Gathering hardware details…
Checking for third-party library availability on the Target…
Gathering hardware details is complete.
Board name : NVIDIA Jetson AGX Orin Developer Kit
CUDA Version : 12.6
cuDNN Version : 9.3
TensorRT Version : 10.
GStreamer Version : 1.20.3
V4L2 Version : 1.22.1-2build1
SDL Version : 1.2
OpenCV Version : 4.8.0
Available Webcams :
Available GPUs : Orin
Available Digital Pins : 7 11 12 13 15 16 18 19 21 22 23 24 26 29 31 32 33 35 36 37 38 40
I believe i’m running jetpack 6.
getCameraList(hwobj)
Camera Name Video Device Available Resolutions Pixel Formats
______________________________ _____________ ________________________________________ _____________
"vi-output, ecam_gmsl 9-0044" "/dev/video0" "[1280 720],[1920 1080],[1920 1200]" "UYVY,NV16"
"vi-output, ecam_gmsl 10-0043" "/dev/video1" "[1280 720],[1920 1080],[1920 1200]" "UYVY,NV16"
"vi-output, ecam_gmsl 10-0044" "/dev/video2" "[1280 720],[1920 1080],[1920 1200]" "UYVY,NV16"
when i try to run the folloiwng command ige tan error:
cam = camera(hwobj, ‘vi-output, ecam_gmsl 9-0044’, [1280 720]);
img = snapshot(cam);
Error using nvidiaboard/recvResponse
Unable to pull the frame.
Error in nvidiaio.internal.camera/open (line 262)
obj.ConnectedCamera = obj.NvObj.recvResponse() + 1;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nvidiaio.internal.camera (line 109)
obj.open();
^^^^^^^^^^^
Error in nvidiaboard/camera
this shows up no matter what camera i use, and whatever resoluition I use. jetson, orin MATLAB Answers — New Questions
Transfer License
I would like to transfer my Matlab and Simulink licenses to a new person in the company. How can I accomplish that?
Thank you.I would like to transfer my Matlab and Simulink licenses to a new person in the company. How can I accomplish that?
Thank you. I would like to transfer my Matlab and Simulink licenses to a new person in the company. How can I accomplish that?
Thank you. matlab, license MATLAB Answers — New Questions
Is the Order of Function Evaluation Guaranteed when Function Outputs are Concatenated into an an Array?
Suppose I call two functions within concatenation into an array
A = [ones(1,2),zeros(1,2)]
In this case, the order in which ones and zeros are evaluated doesn’t matter as far as the result is concerned.
But what about when there is dependence between the two (or more) functions whose outputs are being concatenated:
A = [figure,plot(1:3)]
Is there any guarantee that the call to figure is evaluated and the figure created before the call to plot so that the plotted result is in the newly created figure?
Does the answer change if creating a cell array?
A= {figure,plot(rand(2))}Suppose I call two functions within concatenation into an array
A = [ones(1,2),zeros(1,2)]
In this case, the order in which ones and zeros are evaluated doesn’t matter as far as the result is concerned.
But what about when there is dependence between the two (or more) functions whose outputs are being concatenated:
A = [figure,plot(1:3)]
Is there any guarantee that the call to figure is evaluated and the figure created before the call to plot so that the plotted result is in the newly created figure?
Does the answer change if creating a cell array?
A= {figure,plot(rand(2))} Suppose I call two functions within concatenation into an array
A = [ones(1,2),zeros(1,2)]
In this case, the order in which ones and zeros are evaluated doesn’t matter as far as the result is concerned.
But what about when there is dependence between the two (or more) functions whose outputs are being concatenated:
A = [figure,plot(1:3)]
Is there any guarantee that the call to figure is evaluated and the figure created before the call to plot so that the plotted result is in the newly created figure?
Does the answer change if creating a cell array?
A= {figure,plot(rand(2))} function evaluation, concatenation MATLAB Answers — New Questions
any way of processing callbacks without updating figures?
Is there any way of processing callbacks without updating the figures? I know that drawnow can update the figures without processing callbacks, but is there some way of doing the opposite? In the code I’m writing, the callbacks are important and need to be handled regularly, but updating the figures is lower priority. I also tried pause(0), but I didn’t see any difference between that and drawnow.Is there any way of processing callbacks without updating the figures? I know that drawnow can update the figures without processing callbacks, but is there some way of doing the opposite? In the code I’m writing, the callbacks are important and need to be handled regularly, but updating the figures is lower priority. I also tried pause(0), but I didn’t see any difference between that and drawnow. Is there any way of processing callbacks without updating the figures? I know that drawnow can update the figures without processing callbacks, but is there some way of doing the opposite? In the code I’m writing, the callbacks are important and need to be handled regularly, but updating the figures is lower priority. I also tried pause(0), but I didn’t see any difference between that and drawnow. callbacks, drawnow MATLAB Answers — New Questions
Virtual hardware availability in simulation environment
I want to develop hardware in loop model using STM32 microcontroller hardware. Prior to that, I want to do simulation with virtual model of hardware. It means the mechanism, motors and hardware, all are virtual. Is such facility available in MATLAB for STM32 or for any other hardware?I want to develop hardware in loop model using STM32 microcontroller hardware. Prior to that, I want to do simulation with virtual model of hardware. It means the mechanism, motors and hardware, all are virtual. Is such facility available in MATLAB for STM32 or for any other hardware? I want to develop hardware in loop model using STM32 microcontroller hardware. Prior to that, I want to do simulation with virtual model of hardware. It means the mechanism, motors and hardware, all are virtual. Is such facility available in MATLAB for STM32 or for any other hardware? hil, stm32, hardware MATLAB Answers — New Questions
Calculating 6D Estimation (3 Translations and 3 Rotations) from Two Orthogonal Detectors Output ((X, Y, Thea, Roll)
Hello everyone,
I am currently simulating a 2D-to-3D image registration pipeline to estimate 6D transformations (3D translations and 3 rotations) using two orthogonal X-ray detectors. From each detector, I can calculate the in-plane transformations (X, Y, Theta) and the out-of-plane rotations (Roll).
My question is whether it is possible to compute the full 6D transformation (3 translations and 3 rotations) using the information provided (X, Y, Theta, Roll).
I would greatly appreciate any insights or suggestions regarding this topic.
Thank you!Hello everyone,
I am currently simulating a 2D-to-3D image registration pipeline to estimate 6D transformations (3D translations and 3 rotations) using two orthogonal X-ray detectors. From each detector, I can calculate the in-plane transformations (X, Y, Theta) and the out-of-plane rotations (Roll).
My question is whether it is possible to compute the full 6D transformation (3 translations and 3 rotations) using the information provided (X, Y, Theta, Roll).
I would greatly appreciate any insights or suggestions regarding this topic.
Thank you! Hello everyone,
I am currently simulating a 2D-to-3D image registration pipeline to estimate 6D transformations (3D translations and 3 rotations) using two orthogonal X-ray detectors. From each detector, I can calculate the in-plane transformations (X, Y, Theta) and the out-of-plane rotations (Roll).
My question is whether it is possible to compute the full 6D transformation (3 translations and 3 rotations) using the information provided (X, Y, Theta, Roll).
I would greatly appreciate any insights or suggestions regarding this topic.
Thank you! 2d-to-3d image registration, 6d transformations MATLAB Answers — New Questions
Error only in versions after 2023b “Warning: Background transparency is not supported; using white instead.”
So far I have tried plotting and exporting the figure with versions 2024b, 2025b and MatlabOnline. Unfortunately, I am running into wall with generating/exporting figures with transparent background. For any type of plots, even just 2D plots:
[a, b] = deal(rand(5,1), rand(5,1))
plot(a,b)
In the past I would just click Edit > Copy Figure and paste into my word doc or anywhere. I checked theEdit > Copy Options… and set the Transparent background. Plots generated by these versions alway retain the background color white or black depending on the theme setting. The transparent option does not even show up if I go through File > Export Setup…>Export .
If I try to export in command in 2024b & 2025b I get the warning:
On Matlab Online I get even more warnings:
Warning: exportsetupdlg will be removed. Using uiexportdlg instead.
> In exportsetupdlg (line 27)
In matlab.graphics.internal.toolstrip.FigureToolstripActionFactory
In matlab.graphics.internal.toolstrip.FigureToolstripActionFactory
In matlab.graphics.internal.toolstrip/FigureToolstripActionFactory/executeAction
In matlab.graphics.internal.toolstrip.FigureToolstripManager.actionCallback
Warning: Background transparency is not supported; using black instead.
Warning: Background transparency is not supported; using black instead.
I have been using Matlab for a long time so I have not fiddled with any settings for years. I test ran plot scripts that I used with 2023b and previous versions successfully before but this issue persist with the new Matlab versions.
I was excited to see 2025 versions got dark theme but can’t even use for this minor but very inconvient issue. Please help!
Update: Just reinstalled 2023b, now getting the same error on 2023b too!So far I have tried plotting and exporting the figure with versions 2024b, 2025b and MatlabOnline. Unfortunately, I am running into wall with generating/exporting figures with transparent background. For any type of plots, even just 2D plots:
[a, b] = deal(rand(5,1), rand(5,1))
plot(a,b)
In the past I would just click Edit > Copy Figure and paste into my word doc or anywhere. I checked theEdit > Copy Options… and set the Transparent background. Plots generated by these versions alway retain the background color white or black depending on the theme setting. The transparent option does not even show up if I go through File > Export Setup…>Export .
If I try to export in command in 2024b & 2025b I get the warning:
On Matlab Online I get even more warnings:
Warning: exportsetupdlg will be removed. Using uiexportdlg instead.
> In exportsetupdlg (line 27)
In matlab.graphics.internal.toolstrip.FigureToolstripActionFactory
In matlab.graphics.internal.toolstrip.FigureToolstripActionFactory
In matlab.graphics.internal.toolstrip/FigureToolstripActionFactory/executeAction
In matlab.graphics.internal.toolstrip.FigureToolstripManager.actionCallback
Warning: Background transparency is not supported; using black instead.
Warning: Background transparency is not supported; using black instead.
I have been using Matlab for a long time so I have not fiddled with any settings for years. I test ran plot scripts that I used with 2023b and previous versions successfully before but this issue persist with the new Matlab versions.
I was excited to see 2025 versions got dark theme but can’t even use for this minor but very inconvient issue. Please help!
Update: Just reinstalled 2023b, now getting the same error on 2023b too! So far I have tried plotting and exporting the figure with versions 2024b, 2025b and MatlabOnline. Unfortunately, I am running into wall with generating/exporting figures with transparent background. For any type of plots, even just 2D plots:
[a, b] = deal(rand(5,1), rand(5,1))
plot(a,b)
In the past I would just click Edit > Copy Figure and paste into my word doc or anywhere. I checked theEdit > Copy Options… and set the Transparent background. Plots generated by these versions alway retain the background color white or black depending on the theme setting. The transparent option does not even show up if I go through File > Export Setup…>Export .
If I try to export in command in 2024b & 2025b I get the warning:
On Matlab Online I get even more warnings:
Warning: exportsetupdlg will be removed. Using uiexportdlg instead.
> In exportsetupdlg (line 27)
In matlab.graphics.internal.toolstrip.FigureToolstripActionFactory
In matlab.graphics.internal.toolstrip.FigureToolstripActionFactory
In matlab.graphics.internal.toolstrip/FigureToolstripActionFactory/executeAction
In matlab.graphics.internal.toolstrip.FigureToolstripManager.actionCallback
Warning: Background transparency is not supported; using black instead.
Warning: Background transparency is not supported; using black instead.
I have been using Matlab for a long time so I have not fiddled with any settings for years. I test ran plot scripts that I used with 2023b and previous versions successfully before but this issue persist with the new Matlab versions.
I was excited to see 2025 versions got dark theme but can’t even use for this minor but very inconvient issue. Please help!
Update: Just reinstalled 2023b, now getting the same error on 2023b too! background-transparency, 2024b, 2025b, warning MATLAB Answers — New Questions
Control System for a Thermoelectric Cooler in Matlab & Simulink
I’m looking to model the control system block diagram for a thermoelectric cooler (TEC), that will be used in a small fridge. I’ve used the "Control Systems" toolbox to create block diagrams and get transient and steady state responses before for classes, however the transfer functions were often given or easy to solve. In this case, I’m stuck at finding the transfer function of the TEC, and how to incorporate it into a system. I recently learned about the simscape electronics toolbox that has a TEC block available, and a tutorial on how to use it, however I am unsure of how (or if) that would work with the control systems toolbox.
For some additional information on what I’m trying to acheive, here is an application note on a similar project. I’m mostly trying to recreate Figure 2 from Maxim Integrated’s APPLICATION NOTE 5424. I haven’t picked out exact components yet.
I’m new to control systems, matlab, simulink, and TECs, so any information would be greatly appreciated! And if I am going about this all wrong, a new direction would be appreciated as well.I’m looking to model the control system block diagram for a thermoelectric cooler (TEC), that will be used in a small fridge. I’ve used the "Control Systems" toolbox to create block diagrams and get transient and steady state responses before for classes, however the transfer functions were often given or easy to solve. In this case, I’m stuck at finding the transfer function of the TEC, and how to incorporate it into a system. I recently learned about the simscape electronics toolbox that has a TEC block available, and a tutorial on how to use it, however I am unsure of how (or if) that would work with the control systems toolbox.
For some additional information on what I’m trying to acheive, here is an application note on a similar project. I’m mostly trying to recreate Figure 2 from Maxim Integrated’s APPLICATION NOTE 5424. I haven’t picked out exact components yet.
I’m new to control systems, matlab, simulink, and TECs, so any information would be greatly appreciated! And if I am going about this all wrong, a new direction would be appreciated as well. I’m looking to model the control system block diagram for a thermoelectric cooler (TEC), that will be used in a small fridge. I’ve used the "Control Systems" toolbox to create block diagrams and get transient and steady state responses before for classes, however the transfer functions were often given or easy to solve. In this case, I’m stuck at finding the transfer function of the TEC, and how to incorporate it into a system. I recently learned about the simscape electronics toolbox that has a TEC block available, and a tutorial on how to use it, however I am unsure of how (or if) that would work with the control systems toolbox.
For some additional information on what I’m trying to acheive, here is an application note on a similar project. I’m mostly trying to recreate Figure 2 from Maxim Integrated’s APPLICATION NOTE 5424. I haven’t picked out exact components yet.
I’m new to control systems, matlab, simulink, and TECs, so any information would be greatly appreciated! And if I am going about this all wrong, a new direction would be appreciated as well. tec, controlsystems, peltiercooler MATLAB Answers — New Questions
Why is Matlab unable to import Wolfspeed Mosfet with Diode Model?
Hi,
I’m trying to import Mosfet Model parameters from PLECS .xml file provided by Wolfspeed using ee_importDeviceParameters function, however, I keep getting this error:
I have already inserted a mosfet block in Simulink with the body diode included and I use the function like this.
ee_importDeviceParameters("E3M0040120J2.xml","wolfspeed","untitled/MOSFET (Ideal, Switching)", GateResistanceOn=1, GateResistanceOff=1)
Is there anything I am missing?
Thanks in advance!Hi,
I’m trying to import Mosfet Model parameters from PLECS .xml file provided by Wolfspeed using ee_importDeviceParameters function, however, I keep getting this error:
I have already inserted a mosfet block in Simulink with the body diode included and I use the function like this.
ee_importDeviceParameters("E3M0040120J2.xml","wolfspeed","untitled/MOSFET (Ideal, Switching)", GateResistanceOn=1, GateResistanceOff=1)
Is there anything I am missing?
Thanks in advance! Hi,
I’m trying to import Mosfet Model parameters from PLECS .xml file provided by Wolfspeed using ee_importDeviceParameters function, however, I keep getting this error:
I have already inserted a mosfet block in Simulink with the body diode included and I use the function like this.
ee_importDeviceParameters("E3M0040120J2.xml","wolfspeed","untitled/MOSFET (Ideal, Switching)", GateResistanceOn=1, GateResistanceOff=1)
Is there anything I am missing?
Thanks in advance! mosfet, simscape MATLAB Answers — New Questions
Removing ghost rings on CCD reading?
Hello! I have a matrix were each value contains a level of intensity. I do some data manipulation on my data, and create these plots. My function that removes the ghost rings is horrible because it pouches everything. My goal is to only pouch the shadow ring. Can I get some advice on how to deal with it? TThanks!Hello! I have a matrix were each value contains a level of intensity. I do some data manipulation on my data, and create these plots. My function that removes the ghost rings is horrible because it pouches everything. My goal is to only pouch the shadow ring. Can I get some advice on how to deal with it? TThanks! Hello! I have a matrix were each value contains a level of intensity. I do some data manipulation on my data, and create these plots. My function that removes the ghost rings is horrible because it pouches everything. My goal is to only pouch the shadow ring. Can I get some advice on how to deal with it? TThanks! image processing, artifact removal MATLAB Answers — New Questions
Find the first value that is greater than or equal to and its corresponding value
A table from an .txt file is imported. It looks like this (say first column as x and second as y)
0.01 3
0.02 4
0.03 6
0.04 9
0.05 12
0.06 14
0.07 15
0.08 18
How to find the first value in column y that is greater than or equal to 10 and find the corresponding x value (PS: Both x and y are increasing as it goes down)A table from an .txt file is imported. It looks like this (say first column as x and second as y)
0.01 3
0.02 4
0.03 6
0.04 9
0.05 12
0.06 14
0.07 15
0.08 18
How to find the first value in column y that is greater than or equal to 10 and find the corresponding x value (PS: Both x and y are increasing as it goes down) A table from an .txt file is imported. It looks like this (say first column as x and second as y)
0.01 3
0.02 4
0.03 6
0.04 9
0.05 12
0.06 14
0.07 15
0.08 18
How to find the first value in column y that is greater than or equal to 10 and find the corresponding x value (PS: Both x and y are increasing as it goes down) index, greater, equal, corresponding MATLAB Answers — New Questions
where can I find libmwtommfile.dylib
I have used slbuild to create an executable file from a Simulink model. When I run the executable I get the error mesage
Could not open library: libmwtommfile.dylib
Where can I find this library?I have used slbuild to create an executable file from a Simulink model. When I run the executable I get the error mesage
Could not open library: libmwtommfile.dylib
Where can I find this library? I have used slbuild to create an executable file from a Simulink model. When I run the executable I get the error mesage
Could not open library: libmwtommfile.dylib
Where can I find this library? dynamic library MATLAB Answers — New Questions
FMU Export for Windows x86-32
Dear Sir or Madam,
I am trying to export a Simulink model as Standalone FMU for Windows x86-32 platform. However, I obtain the following error:
Error:An installation of Microsoft Visual C++ 2017 cannot be detected
I have already installed Microsoft Visual Studio BuildTools 2017. This is the installation path.
C:Program Files (x86)Microsoft Visual Studio2017BuildTools
How could I solve this?
Thank you very much in advance.
Víctor Sánchez SuárezDear Sir or Madam,
I am trying to export a Simulink model as Standalone FMU for Windows x86-32 platform. However, I obtain the following error:
Error:An installation of Microsoft Visual C++ 2017 cannot be detected
I have already installed Microsoft Visual Studio BuildTools 2017. This is the installation path.
C:Program Files (x86)Microsoft Visual Studio2017BuildTools
How could I solve this?
Thank you very much in advance.
Víctor Sánchez Suárez Dear Sir or Madam,
I am trying to export a Simulink model as Standalone FMU for Windows x86-32 platform. However, I obtain the following error:
Error:An installation of Microsoft Visual C++ 2017 cannot be detected
I have already installed Microsoft Visual Studio BuildTools 2017. This is the installation path.
C:Program Files (x86)Microsoft Visual Studio2017BuildTools
How could I solve this?
Thank you very much in advance.
Víctor Sánchez Suárez fmu, 32-bit, x86, microsoft visual c++ 2017 MATLAB Answers — New Questions
When generating code, is there a setting to turn type casting on/off?
When generating code from the same Simulink file on two different computers, type casting is not generated on one computer.
This appears to be a setting somewhere other than the Simulink file itself.
Please review this inquiry and respond.When generating code from the same Simulink file on two different computers, type casting is not generated on one computer.
This appears to be a setting somewhere other than the Simulink file itself.
Please review this inquiry and respond. When generating code from the same Simulink file on two different computers, type casting is not generated on one computer.
This appears to be a setting somewhere other than the Simulink file itself.
Please review this inquiry and respond. type casting, code generation, simulink, matlab MATLAB Answers — New Questions
How to initialize the deep learning ip core generated by deep learning hdl toolbox
Hi,
I’m currently working with the Deep Learning HDL Toolbox and would like to integrate the generated IP core into my own RTL design.
I used Wireshark to capture the traffic between MATLAB and the board, and I can now “run” the core by replaying those packets.
However, I haven’t been able to reverse-engineer the full initialization sequence: loading the network weights into external DDR, programming the configuration registers, and completing any hidden hand-shakes that happen before the first inference.
When I let MATLAB drive the board the same bit-stream works perfectly, so the missing piece is clearly the initialization flow.
Could you point me to the register map, the required power-on sequence, or any documentation that explains how to bring the Deep Learning IP out of reset and validate that it is ready to accept input data?
Thank you very much for your help.
Best regards.
Looking forward to your reply.Hi,
I’m currently working with the Deep Learning HDL Toolbox and would like to integrate the generated IP core into my own RTL design.
I used Wireshark to capture the traffic between MATLAB and the board, and I can now “run” the core by replaying those packets.
However, I haven’t been able to reverse-engineer the full initialization sequence: loading the network weights into external DDR, programming the configuration registers, and completing any hidden hand-shakes that happen before the first inference.
When I let MATLAB drive the board the same bit-stream works perfectly, so the missing piece is clearly the initialization flow.
Could you point me to the register map, the required power-on sequence, or any documentation that explains how to bring the Deep Learning IP out of reset and validate that it is ready to accept input data?
Thank you very much for your help.
Best regards.
Looking forward to your reply. Hi,
I’m currently working with the Deep Learning HDL Toolbox and would like to integrate the generated IP core into my own RTL design.
I used Wireshark to capture the traffic between MATLAB and the board, and I can now “run” the core by replaying those packets.
However, I haven’t been able to reverse-engineer the full initialization sequence: loading the network weights into external DDR, programming the configuration registers, and completing any hidden hand-shakes that happen before the first inference.
When I let MATLAB drive the board the same bit-stream works perfectly, so the missing piece is clearly the initialization flow.
Could you point me to the register map, the required power-on sequence, or any documentation that explains how to bring the Deep Learning IP out of reset and validate that it is ready to accept input data?
Thank you very much for your help.
Best regards.
Looking forward to your reply. fpga, deep learning ip core, initialize MATLAB Answers — New Questions
Microsoft announces acquisition of Osmos to accelerate autonomous data engineering in Fabric
Today, Microsoft is announcing the acquisition of Osmos, an agentic AI data engineering platform designed to help simplify complex and time-consuming data workflows.
Microsoft + Osmos: Extending Microsoft Fabric with agentic AI for data engineering
Organizations today face a common challenge: data is everywhere, but making it actionable is often manual, slow and expensive. Many teams spend most of their time preparing data instead of analyzing it. Osmos solves this problem by applying agentic AI to turn raw data into analytics and AI-ready assets in OneLake, the unified data lake at the core of Microsoft Fabric.
This acquisition builds on Microsoft Fabric’s goal to enable customers to unify all data and analytics into a single, secure platform. With the acquisition of Osmos, we are taking the next step toward a future where autonomous AI agents work alongside people — helping reduce operational overhead and making it easier for customers to connect, prepare, analyze and share data across the organization.
Looking ahead: Empowering customers to unlock value from data
Today’s announcement reinforces Microsoft’s focus to help every organization unlock more value from their data faster and with greater simplicity. The Osmos team will join Microsoft’s Fabric engineering organization to advance our vision for simpler, more intuitive and AI-ready data experiences.
Stay tuned for updates as we integrate Osmos into Fabric and continue our journey to empower every organization to achieve more with data. To follow updates, visit the Microsoft Fabric Blog.
Bogdan Crivat leads Microsoft’s Azure Data Analytics, building the Fabric engines for big data behind Power BI, and our AI-powered analytics infrastructure.
The post Microsoft announces acquisition of Osmos to accelerate autonomous data engineering in Fabric appeared first on The Official Microsoft Blog.
Today, Microsoft is announcing the acquisition of Osmos, an agentic AI data engineering platform designed to help simplify complex and time-consuming data workflows. Microsoft + Osmos: Extending Microsoft Fabric with agentic AI for data engineering Organizations today face a common challenge: data is everywhere, but making it actionable is often manual, slow and expensive. Many…
The post Microsoft announces acquisition of Osmos to accelerate autonomous data engineering in Fabric appeared first on The Official Microsoft Blog.Read More
Error replacing .so library
When using MATLAB/Simulink to control an Ettus USRP B210, I encountered the following issue: I modified several parts of the UHD driver and compiled it into a .so file. I want to replace the .so file used by Simulink with my own version, but an error indicates that libtre_hash.so.2 is missing. Is it possible to use my modified driver with Simulink to control the USRP?When using MATLAB/Simulink to control an Ettus USRP B210, I encountered the following issue: I modified several parts of the UHD driver and compiled it into a .so file. I want to replace the .so file used by Simulink with my own version, but an error indicates that libtre_hash.so.2 is missing. Is it possible to use my modified driver with Simulink to control the USRP? When using MATLAB/Simulink to control an Ettus USRP B210, I encountered the following issue: I modified several parts of the UHD driver and compiled it into a .so file. I want to replace the .so file used by Simulink with my own version, but an error indicates that libtre_hash.so.2 is missing. Is it possible to use my modified driver with Simulink to control the USRP? simulink, ,r2023b MATLAB Answers — New Questions
Putting spaces between elements of a string/
I have found some graph resources that list the adjacency matrices as strings of numbers without spaces, such as:
011001110000
101111000000
110100011000
011010001100
010101000110
110010100010
100001010011
101000101001
001100010101
000110001011
000011100101
000000111110
I would like to insert spaces between each digit, so that I can use it as my adjacency matrix in Matlab. Is there a good way to do this? The matrices will all be square, but of different sizes.I have found some graph resources that list the adjacency matrices as strings of numbers without spaces, such as:
011001110000
101111000000
110100011000
011010001100
010101000110
110010100010
100001010011
101000101001
001100010101
000110001011
000011100101
000000111110
I would like to insert spaces between each digit, so that I can use it as my adjacency matrix in Matlab. Is there a good way to do this? The matrices will all be square, but of different sizes. I have found some graph resources that list the adjacency matrices as strings of numbers without spaces, such as:
011001110000
101111000000
110100011000
011010001100
010101000110
110010100010
100001010011
101000101001
001100010101
000110001011
000011100101
000000111110
I would like to insert spaces between each digit, so that I can use it as my adjacency matrix in Matlab. Is there a good way to do this? The matrices will all be square, but of different sizes. adjacency matrix, strings, spaces, formatting MATLAB Answers — New Questions
Why t_tide prediction is offseted?
Hi, i’m trying to use t_tide_v1.4beta using matlab R2016a in 2 ways like in t_tide example but the result of the harmonic constants is not similar and the prediction is not similar between prediction also offseted to the observation data. Help me please. Herewith the code and the data that I use.
Code:
clear
clc
%format LONGG
%load t_example
% load data excel
data = readtable(‘D:TestT_Tidet_tide_v1.4betakmna_wnan.xlsx’);
time_axis = datetime(data.waktu);
data_time = datenum(time_axis);
obs_value = data.ukuran;
% Analisis Harminik
%—————————————————————————
% Way 1
% analisys
[NAME,FREQ,TIDECON,XOUT] = t_tide(obs_value,’interval’,1,’start’,data_time(1),’latitude’,-3.66295,’synthesis’,1);
% prediction
YOUT=t_predic(data_time,NAME,FREQ,TIDECON,’latitude’,-3.66295,’synthesis’,1);
% Way 2
% analisys
[HarKons,XOUT2]=t_tide(obs_value,’interval’,1,’start’,data_time(1),’latitude’,-3.66295,’rayleigh’,1,’synthesis’,1);
% prediction
% YOUT=T_PREDIC(TIM,TIDESTRUC,…)
YOUTHarKons1=t_predic(data_time,HarKons,’latitude’,-3.66295,’synthesis’,1);
YOUTHarKons2=t_predic(data_time,HarKons);
%% visualisasi
figure(1)
plot(time_axis,obs_value,’b’,’LineWidth’,1.5); hold on
plot(time_axis,XOUT,’r–‘,’LineWidth’,1.5); hold on
plot(time_axis,YOUT,’c.’,’LineWidth’,1.5); hold on
plot(time_axis,YOUTHarKons1,’kx’,’LineWidth’,1.5); hold on
plot(time_axis,YOUTHarKons2,’ko’,’LineWidth’,1.5); hold on
title(‘Tidal Elevation’,’FontSize’,14,’fontWeight’,’b’)
legend({‘obs_value’, ‘XOUT’, ‘YOUT’, ‘YOUTHarKons1’, ‘YOUTHarKons2′},’FontSize’, 10, ‘FontWeight’, ‘bold’, ‘Location’, ‘northeastoutside’);
xlabel(‘Time’,’FontSize’,14,’FontWeight’,’b’)
ylabel(‘Elevation (m)’,’FontSize’,14,’FontWeight’,’b’)
% Format sumbu X agar menampilkan tanggal/waktu
% datetick(‘x’, ‘dd/mm/yyyy HH:MM:ss’, ‘keepticks’, ‘keeplimits’)
grid on
Tidal graph obs_value and prediction:
Data:Hi, i’m trying to use t_tide_v1.4beta using matlab R2016a in 2 ways like in t_tide example but the result of the harmonic constants is not similar and the prediction is not similar between prediction also offseted to the observation data. Help me please. Herewith the code and the data that I use.
Code:
clear
clc
%format LONGG
%load t_example
% load data excel
data = readtable(‘D:TestT_Tidet_tide_v1.4betakmna_wnan.xlsx’);
time_axis = datetime(data.waktu);
data_time = datenum(time_axis);
obs_value = data.ukuran;
% Analisis Harminik
%—————————————————————————
% Way 1
% analisys
[NAME,FREQ,TIDECON,XOUT] = t_tide(obs_value,’interval’,1,’start’,data_time(1),’latitude’,-3.66295,’synthesis’,1);
% prediction
YOUT=t_predic(data_time,NAME,FREQ,TIDECON,’latitude’,-3.66295,’synthesis’,1);
% Way 2
% analisys
[HarKons,XOUT2]=t_tide(obs_value,’interval’,1,’start’,data_time(1),’latitude’,-3.66295,’rayleigh’,1,’synthesis’,1);
% prediction
% YOUT=T_PREDIC(TIM,TIDESTRUC,…)
YOUTHarKons1=t_predic(data_time,HarKons,’latitude’,-3.66295,’synthesis’,1);
YOUTHarKons2=t_predic(data_time,HarKons);
%% visualisasi
figure(1)
plot(time_axis,obs_value,’b’,’LineWidth’,1.5); hold on
plot(time_axis,XOUT,’r–‘,’LineWidth’,1.5); hold on
plot(time_axis,YOUT,’c.’,’LineWidth’,1.5); hold on
plot(time_axis,YOUTHarKons1,’kx’,’LineWidth’,1.5); hold on
plot(time_axis,YOUTHarKons2,’ko’,’LineWidth’,1.5); hold on
title(‘Tidal Elevation’,’FontSize’,14,’fontWeight’,’b’)
legend({‘obs_value’, ‘XOUT’, ‘YOUT’, ‘YOUTHarKons1’, ‘YOUTHarKons2′},’FontSize’, 10, ‘FontWeight’, ‘bold’, ‘Location’, ‘northeastoutside’);
xlabel(‘Time’,’FontSize’,14,’FontWeight’,’b’)
ylabel(‘Elevation (m)’,’FontSize’,14,’FontWeight’,’b’)
% Format sumbu X agar menampilkan tanggal/waktu
% datetick(‘x’, ‘dd/mm/yyyy HH:MM:ss’, ‘keepticks’, ‘keeplimits’)
grid on
Tidal graph obs_value and prediction:
Data: Hi, i’m trying to use t_tide_v1.4beta using matlab R2016a in 2 ways like in t_tide example but the result of the harmonic constants is not similar and the prediction is not similar between prediction also offseted to the observation data. Help me please. Herewith the code and the data that I use.
Code:
clear
clc
%format LONGG
%load t_example
% load data excel
data = readtable(‘D:TestT_Tidet_tide_v1.4betakmna_wnan.xlsx’);
time_axis = datetime(data.waktu);
data_time = datenum(time_axis);
obs_value = data.ukuran;
% Analisis Harminik
%—————————————————————————
% Way 1
% analisys
[NAME,FREQ,TIDECON,XOUT] = t_tide(obs_value,’interval’,1,’start’,data_time(1),’latitude’,-3.66295,’synthesis’,1);
% prediction
YOUT=t_predic(data_time,NAME,FREQ,TIDECON,’latitude’,-3.66295,’synthesis’,1);
% Way 2
% analisys
[HarKons,XOUT2]=t_tide(obs_value,’interval’,1,’start’,data_time(1),’latitude’,-3.66295,’rayleigh’,1,’synthesis’,1);
% prediction
% YOUT=T_PREDIC(TIM,TIDESTRUC,…)
YOUTHarKons1=t_predic(data_time,HarKons,’latitude’,-3.66295,’synthesis’,1);
YOUTHarKons2=t_predic(data_time,HarKons);
%% visualisasi
figure(1)
plot(time_axis,obs_value,’b’,’LineWidth’,1.5); hold on
plot(time_axis,XOUT,’r–‘,’LineWidth’,1.5); hold on
plot(time_axis,YOUT,’c.’,’LineWidth’,1.5); hold on
plot(time_axis,YOUTHarKons1,’kx’,’LineWidth’,1.5); hold on
plot(time_axis,YOUTHarKons2,’ko’,’LineWidth’,1.5); hold on
title(‘Tidal Elevation’,’FontSize’,14,’fontWeight’,’b’)
legend({‘obs_value’, ‘XOUT’, ‘YOUT’, ‘YOUTHarKons1’, ‘YOUTHarKons2′},’FontSize’, 10, ‘FontWeight’, ‘bold’, ‘Location’, ‘northeastoutside’);
xlabel(‘Time’,’FontSize’,14,’FontWeight’,’b’)
ylabel(‘Elevation (m)’,’FontSize’,14,’FontWeight’,’b’)
% Format sumbu X agar menampilkan tanggal/waktu
% datetick(‘x’, ‘dd/mm/yyyy HH:MM:ss’, ‘keepticks’, ‘keeplimits’)
grid on
Tidal graph obs_value and prediction:
Data: t_tide MATLAB Answers — New Questions









