Category: Matlab
Category Archives: Matlab
MATLAB file on opening showing weird symbols or letters
I had saved a .m file and today when i tried opening the file it just shows some symbols and letters like
MATLAB 5.0 MAT-file, Platform: PCWIN64, Created on: Fri Aug 9 16:22:11 2024
‰ì=³÷<öã{ÏÌdÙ„·ý^Ÿë÷=×õ<ës]çÜÎýñ|¾vÐÑѱÐÑ1ýï‘XLÿ»#nŒÄb%Ãÿ=ðÿߦ£ÿ¿×ŠwMI had saved a .m file and today when i tried opening the file it just shows some symbols and letters like
MATLAB 5.0 MAT-file, Platform: PCWIN64, Created on: Fri Aug 9 16:22:11 2024
‰ì=³÷<öã{ÏÌdÙ„·ý^Ÿë÷=×õ<ës]çÜÎýñ|¾vÐÑѱÐÑ1ýï‘XLÿ»#nŒÄb%Ãÿ=ðÿߦ£ÿ¿×ŠwM I had saved a .m file and today when i tried opening the file it just shows some symbols and letters like
MATLAB 5.0 MAT-file, Platform: PCWIN64, Created on: Fri Aug 9 16:22:11 2024
‰ì=³÷<öã{ÏÌdÙ„·ý^Ÿë÷=×õ<ës]çÜÎýñ|¾vÐÑѱÐÑ1ýï‘XLÿ»#nŒÄb%Ãÿ=ðÿߦ£ÿ¿×ŠwM file opening MATLAB Answers — New Questions
Temperature increase after increasing flowrate
Hello community,
I am modelling a liquid cooling network which i will parameterize based on a real liquid cooling network that i built.
It consistis of a pump, radiator, reservoir and a cooler element beside the tubing and all additional sensors.
In that particular scenario, the pump is turned on after 10 minutes and reaches it full flowrate after 10 seconds, from there it is constantly working till stop.
The cooler is modelled as a tube element hooked up to a thermal network which is applying 10W of power. The simple tubes before and after should modell the natural convection that i see in the real measurements while powering the heater and keeping the pump turned off.
If the pump is turned on at 600s, we can see a temperatue increase in the sensor located after the cooler which i cannot see in the real measurements and rather looks like the decreasing cooler surface temperature.
I would like to understand how this behavior is created and if possible how to avoid it. I can imagine that at the port of the temperature sensor, after the liquid was heated for that time, that the mass of the liquid inside the cooler is virtually passing the temperature sensor and it taking some time to cool down to average coolant temperature. But as a novice in Simscape Modelling I am having a hard time understanding the mechanisms behind that.
I greatly appreciate any suggestion and explanations from you, looking forward to it. Thanks much!Hello community,
I am modelling a liquid cooling network which i will parameterize based on a real liquid cooling network that i built.
It consistis of a pump, radiator, reservoir and a cooler element beside the tubing and all additional sensors.
In that particular scenario, the pump is turned on after 10 minutes and reaches it full flowrate after 10 seconds, from there it is constantly working till stop.
The cooler is modelled as a tube element hooked up to a thermal network which is applying 10W of power. The simple tubes before and after should modell the natural convection that i see in the real measurements while powering the heater and keeping the pump turned off.
If the pump is turned on at 600s, we can see a temperatue increase in the sensor located after the cooler which i cannot see in the real measurements and rather looks like the decreasing cooler surface temperature.
I would like to understand how this behavior is created and if possible how to avoid it. I can imagine that at the port of the temperature sensor, after the liquid was heated for that time, that the mass of the liquid inside the cooler is virtually passing the temperature sensor and it taking some time to cool down to average coolant temperature. But as a novice in Simscape Modelling I am having a hard time understanding the mechanisms behind that.
I greatly appreciate any suggestion and explanations from you, looking forward to it. Thanks much! Hello community,
I am modelling a liquid cooling network which i will parameterize based on a real liquid cooling network that i built.
It consistis of a pump, radiator, reservoir and a cooler element beside the tubing and all additional sensors.
In that particular scenario, the pump is turned on after 10 minutes and reaches it full flowrate after 10 seconds, from there it is constantly working till stop.
The cooler is modelled as a tube element hooked up to a thermal network which is applying 10W of power. The simple tubes before and after should modell the natural convection that i see in the real measurements while powering the heater and keeping the pump turned off.
If the pump is turned on at 600s, we can see a temperatue increase in the sensor located after the cooler which i cannot see in the real measurements and rather looks like the decreasing cooler surface temperature.
I would like to understand how this behavior is created and if possible how to avoid it. I can imagine that at the port of the temperature sensor, after the liquid was heated for that time, that the mass of the liquid inside the cooler is virtually passing the temperature sensor and it taking some time to cool down to average coolant temperature. But as a novice in Simscape Modelling I am having a hard time understanding the mechanisms behind that.
I greatly appreciate any suggestion and explanations from you, looking forward to it. Thanks much! simscape, simulink, scope, model, parameter MATLAB Answers — New Questions
ousterFileReader give no correct result
The function ousterFileReader not work correcty in 2023b with lidar’s FW 2.4. As in json there is a negative shift, and intensivity value shift in row… BugThe function ousterFileReader not work correcty in 2023b with lidar’s FW 2.4. As in json there is a negative shift, and intensivity value shift in row… Bug The function ousterFileReader not work correcty in 2023b with lidar’s FW 2.4. As in json there is a negative shift, and intensivity value shift in row… Bug lidar toolbox, ouster lidar, matlab MATLAB Answers — New Questions
Unrecognized method, property, or field for generated protobuf message
Hi all,
We have a project where we communicate with a device using gRPC. On the computer, we run Python in a virtual enviornment. We load that environment in matlab using pyenv. We use MATLAB 2023b (23.2.0.2599560 (R2023b) Update 8) and Python 3.10.11.
Connecting with the device and querying some device information works in both, Python and MATLAB. However, since 2-3 months, we are unable to access members of protobuf messages. Below is an example of the code we execute in Python and the equivalent code executed in MATLAB:
Python:
% C:workdatakingfisher-py.venvScriptspython.exe "…"
import kingfisher_py.lib as kgfLib
scn = kgfLib.device.Scanner(‘10.10.1.1’, ‘8081’)
device_info = scn.device_info.get_info()
device_info.sw_rev
items {
key: "mcu"
value: "v1.0.1"
}
items {
key: "kingfisher"
value: "5.2.0-cam-cal-third-party-rc.1-5-gd6f7161"
}
% response continues…
MATLAB:
>> kgfLib = py.importlib.import_module(‘kingfisher_py.lib’);
>> scn = kgfLib.device.Scanner(‘10.10.1.1’, ‘8081’);
>> deviceInfo = scn.device_info.get_info();
>> deviceInfo.HasField(‘sw_rev’)
ans =
logical
1
>> deviceInfo.sw_rev
Unrecognized method, property, or field ‘sw_rev’ for class ‘py.kf.api.messages.system_pb2.GetDeviceInfoResponse’.
>> deviceInfo
deviceInfo =
Python GetDeviceInfoResponse with properties:
DESCRIPTOR: [1×1 py.google._upb._message.Descriptor]
manufact_rev {
device_name: "BLK360-2060047"
serial_number: "2060047"
}
sw_rev {
items {
key: "mcu"
value: "v1.0.1"
}
items {
key: "kingfisher"
value: "5.2.0-cam-cal-third-party-rc.1-5-gd6f7161"
}
% response continues…
Note that the same virtual environment is active. MATLAB even says that the field sw_rev exists, but still cannot access it. Also, we checked different versions and combinations of MATLAB and Python. Specifically:
Matlab 9.10.0.2198249 (R2021a) Update 8 + Python 3.8.10
Matlab 9.13.0.2193358 (R2022b) Update 5 + Python 3.8.10
Matlab 9.13.0.2193358 (R2022b) Update 5 + Python 3.10.11
Matlab 23.2.0.2599560 (R2023b) Update 8 + Python 3.10.11
The behaviour is the same with all versions. As the whole communication with the device is set up using protobuf, there is not much we can do with the device at this point as we run into this problem all accorss our MATLAB code base.
Is this a known issue, e.g. with a newer protobuf version? As mentioned, we did not have any issues like this until 2-3 months ago.
Hope to get some help or at least an explanation. Thank you :-)Hi all,
We have a project where we communicate with a device using gRPC. On the computer, we run Python in a virtual enviornment. We load that environment in matlab using pyenv. We use MATLAB 2023b (23.2.0.2599560 (R2023b) Update 8) and Python 3.10.11.
Connecting with the device and querying some device information works in both, Python and MATLAB. However, since 2-3 months, we are unable to access members of protobuf messages. Below is an example of the code we execute in Python and the equivalent code executed in MATLAB:
Python:
% C:workdatakingfisher-py.venvScriptspython.exe "…"
import kingfisher_py.lib as kgfLib
scn = kgfLib.device.Scanner(‘10.10.1.1’, ‘8081’)
device_info = scn.device_info.get_info()
device_info.sw_rev
items {
key: "mcu"
value: "v1.0.1"
}
items {
key: "kingfisher"
value: "5.2.0-cam-cal-third-party-rc.1-5-gd6f7161"
}
% response continues…
MATLAB:
>> kgfLib = py.importlib.import_module(‘kingfisher_py.lib’);
>> scn = kgfLib.device.Scanner(‘10.10.1.1’, ‘8081’);
>> deviceInfo = scn.device_info.get_info();
>> deviceInfo.HasField(‘sw_rev’)
ans =
logical
1
>> deviceInfo.sw_rev
Unrecognized method, property, or field ‘sw_rev’ for class ‘py.kf.api.messages.system_pb2.GetDeviceInfoResponse’.
>> deviceInfo
deviceInfo =
Python GetDeviceInfoResponse with properties:
DESCRIPTOR: [1×1 py.google._upb._message.Descriptor]
manufact_rev {
device_name: "BLK360-2060047"
serial_number: "2060047"
}
sw_rev {
items {
key: "mcu"
value: "v1.0.1"
}
items {
key: "kingfisher"
value: "5.2.0-cam-cal-third-party-rc.1-5-gd6f7161"
}
% response continues…
Note that the same virtual environment is active. MATLAB even says that the field sw_rev exists, but still cannot access it. Also, we checked different versions and combinations of MATLAB and Python. Specifically:
Matlab 9.10.0.2198249 (R2021a) Update 8 + Python 3.8.10
Matlab 9.13.0.2193358 (R2022b) Update 5 + Python 3.8.10
Matlab 9.13.0.2193358 (R2022b) Update 5 + Python 3.10.11
Matlab 23.2.0.2599560 (R2023b) Update 8 + Python 3.10.11
The behaviour is the same with all versions. As the whole communication with the device is set up using protobuf, there is not much we can do with the device at this point as we run into this problem all accorss our MATLAB code base.
Is this a known issue, e.g. with a newer protobuf version? As mentioned, we did not have any issues like this until 2-3 months ago.
Hope to get some help or at least an explanation. Thank you 🙂 Hi all,
We have a project where we communicate with a device using gRPC. On the computer, we run Python in a virtual enviornment. We load that environment in matlab using pyenv. We use MATLAB 2023b (23.2.0.2599560 (R2023b) Update 8) and Python 3.10.11.
Connecting with the device and querying some device information works in both, Python and MATLAB. However, since 2-3 months, we are unable to access members of protobuf messages. Below is an example of the code we execute in Python and the equivalent code executed in MATLAB:
Python:
% C:workdatakingfisher-py.venvScriptspython.exe "…"
import kingfisher_py.lib as kgfLib
scn = kgfLib.device.Scanner(‘10.10.1.1’, ‘8081’)
device_info = scn.device_info.get_info()
device_info.sw_rev
items {
key: "mcu"
value: "v1.0.1"
}
items {
key: "kingfisher"
value: "5.2.0-cam-cal-third-party-rc.1-5-gd6f7161"
}
% response continues…
MATLAB:
>> kgfLib = py.importlib.import_module(‘kingfisher_py.lib’);
>> scn = kgfLib.device.Scanner(‘10.10.1.1’, ‘8081’);
>> deviceInfo = scn.device_info.get_info();
>> deviceInfo.HasField(‘sw_rev’)
ans =
logical
1
>> deviceInfo.sw_rev
Unrecognized method, property, or field ‘sw_rev’ for class ‘py.kf.api.messages.system_pb2.GetDeviceInfoResponse’.
>> deviceInfo
deviceInfo =
Python GetDeviceInfoResponse with properties:
DESCRIPTOR: [1×1 py.google._upb._message.Descriptor]
manufact_rev {
device_name: "BLK360-2060047"
serial_number: "2060047"
}
sw_rev {
items {
key: "mcu"
value: "v1.0.1"
}
items {
key: "kingfisher"
value: "5.2.0-cam-cal-third-party-rc.1-5-gd6f7161"
}
% response continues…
Note that the same virtual environment is active. MATLAB even says that the field sw_rev exists, but still cannot access it. Also, we checked different versions and combinations of MATLAB and Python. Specifically:
Matlab 9.10.0.2198249 (R2021a) Update 8 + Python 3.8.10
Matlab 9.13.0.2193358 (R2022b) Update 5 + Python 3.8.10
Matlab 9.13.0.2193358 (R2022b) Update 5 + Python 3.10.11
Matlab 23.2.0.2599560 (R2023b) Update 8 + Python 3.10.11
The behaviour is the same with all versions. As the whole communication with the device is set up using protobuf, there is not much we can do with the device at this point as we run into this problem all accorss our MATLAB code base.
Is this a known issue, e.g. with a newer protobuf version? As mentioned, we did not have any issues like this until 2-3 months ago.
Hope to get some help or at least an explanation. Thank you 🙂 python, grpc, protobuf MATLAB Answers — New Questions
How to set Categories consistent when using “signalMask” and “plotsigroi” ?
I want to plot using the code below with the loaded mat file attached.
For example, when "m1=200" I obtain the attached figure.
But, the issue is that, the cetegories are not the same order between two subplots.
I want the categories being the same order, e.g., "n/a", "N", "V", "A" in both subplots.
I would appreciate it if you could help me how to do it.
Thank you,
%%
load qNa.mat
m1=200;
figure;
M = signalMask(tl{m1}); subplot(2,1,1);
p1 = plotsigroi(M,G2{m1});
ls = p1.Children;
for i2=1:size(ls,1)
ls(i2).LineWidth = 2.0;
end
srt = sprintf(‘N only w/GT, data-%d ‘,m1);
title(srt)
M = signalMask(pl{m1}); subplot(2,1,2);
p2 = plotsigroi(M,G2{m1});
ls = p2.Children;
for i2=1:size(ls,1)
ls(i2).LineWidth = 2.0;
end
srt2 = sprintf(‘N only w/Est, data-%d’,m1);
title(srt2)I want to plot using the code below with the loaded mat file attached.
For example, when "m1=200" I obtain the attached figure.
But, the issue is that, the cetegories are not the same order between two subplots.
I want the categories being the same order, e.g., "n/a", "N", "V", "A" in both subplots.
I would appreciate it if you could help me how to do it.
Thank you,
%%
load qNa.mat
m1=200;
figure;
M = signalMask(tl{m1}); subplot(2,1,1);
p1 = plotsigroi(M,G2{m1});
ls = p1.Children;
for i2=1:size(ls,1)
ls(i2).LineWidth = 2.0;
end
srt = sprintf(‘N only w/GT, data-%d ‘,m1);
title(srt)
M = signalMask(pl{m1}); subplot(2,1,2);
p2 = plotsigroi(M,G2{m1});
ls = p2.Children;
for i2=1:size(ls,1)
ls(i2).LineWidth = 2.0;
end
srt2 = sprintf(‘N only w/Est, data-%d’,m1);
title(srt2) I want to plot using the code below with the loaded mat file attached.
For example, when "m1=200" I obtain the attached figure.
But, the issue is that, the cetegories are not the same order between two subplots.
I want the categories being the same order, e.g., "n/a", "N", "V", "A" in both subplots.
I would appreciate it if you could help me how to do it.
Thank you,
%%
load qNa.mat
m1=200;
figure;
M = signalMask(tl{m1}); subplot(2,1,1);
p1 = plotsigroi(M,G2{m1});
ls = p1.Children;
for i2=1:size(ls,1)
ls(i2).LineWidth = 2.0;
end
srt = sprintf(‘N only w/GT, data-%d ‘,m1);
title(srt)
M = signalMask(pl{m1}); subplot(2,1,2);
p2 = plotsigroi(M,G2{m1});
ls = p2.Children;
for i2=1:size(ls,1)
ls(i2).LineWidth = 2.0;
end
srt2 = sprintf(‘N only w/Est, data-%d’,m1);
title(srt2) plotsigroi MATLAB Answers — New Questions
How to get metrics during yolov4 detector training process and how to solve data overfitting?
When i use yolov4 detector to achieve a single-class target detection tasks, i can only get training-loss and validation-loss after training process.I have tried to use "options" to get metrics ,but it made Errow, wrong use " nnet.cnn.TrainingOptions/validateDataFormatsAndMetricsAreEmpty ,trainYOLOv4ObjectDetector can’t support ‘Metrics’ training options",my code and errow are below:
Then how to get metrics during yolov4 detector training process?
———————————————————————————————-
Meanwhile, after fine-tuning options parameters,I have trained the detector many times, the final training loss maintains 0.1 while validation loss can only get 2.0, how can I avoid this data overfitting?I’ve tried many methods , if you can give me some suggestions , it will be very helpful .When i use yolov4 detector to achieve a single-class target detection tasks, i can only get training-loss and validation-loss after training process.I have tried to use "options" to get metrics ,but it made Errow, wrong use " nnet.cnn.TrainingOptions/validateDataFormatsAndMetricsAreEmpty ,trainYOLOv4ObjectDetector can’t support ‘Metrics’ training options",my code and errow are below:
Then how to get metrics during yolov4 detector training process?
———————————————————————————————-
Meanwhile, after fine-tuning options parameters,I have trained the detector many times, the final training loss maintains 0.1 while validation loss can only get 2.0, how can I avoid this data overfitting?I’ve tried many methods , if you can give me some suggestions , it will be very helpful . When i use yolov4 detector to achieve a single-class target detection tasks, i can only get training-loss and validation-loss after training process.I have tried to use "options" to get metrics ,but it made Errow, wrong use " nnet.cnn.TrainingOptions/validateDataFormatsAndMetricsAreEmpty ,trainYOLOv4ObjectDetector can’t support ‘Metrics’ training options",my code and errow are below:
Then how to get metrics during yolov4 detector training process?
———————————————————————————————-
Meanwhile, after fine-tuning options parameters,I have trained the detector many times, the final training loss maintains 0.1 while validation loss can only get 2.0, how can I avoid this data overfitting?I’ve tried many methods , if you can give me some suggestions , it will be very helpful . yolov4 detector, metrics, overfitting MATLAB Answers — New Questions
Simscape 2P Condenser: Fluid Temp lower than ambient air
I’m attempting to simulate a thermosiphon in Simulink using a 2P Condenser operating in ambient, moist air at 20 C. I’ve had a lot of problems with the simulation’s initial values converging, but I think I’ve been able to knock those out by adjusting the reservoir properties downstream to atmospheric temperature and pressure water.
The problem I am having is that the outlet temperature of the condenser is somehow coming back to me lower than the ambient temperature of the cooling air flowing in. It’s always been slightly lower by about 1 or 2 degrees. For 80 C water vapour (quality 1) entering the heat exchanger, the temperature of the liquid (quality 0) leaving the condenser is 18.92 C. Why is this occurring? Clearly, it isn’t physical–what in the model is breaking?
I have attached the simulink file and a photo of the T_out scope and the model as it appears after the simulation has completed.
I am not very familiar with Simulink, so please be thorough with your explanations. Thanks!I’m attempting to simulate a thermosiphon in Simulink using a 2P Condenser operating in ambient, moist air at 20 C. I’ve had a lot of problems with the simulation’s initial values converging, but I think I’ve been able to knock those out by adjusting the reservoir properties downstream to atmospheric temperature and pressure water.
The problem I am having is that the outlet temperature of the condenser is somehow coming back to me lower than the ambient temperature of the cooling air flowing in. It’s always been slightly lower by about 1 or 2 degrees. For 80 C water vapour (quality 1) entering the heat exchanger, the temperature of the liquid (quality 0) leaving the condenser is 18.92 C. Why is this occurring? Clearly, it isn’t physical–what in the model is breaking?
I have attached the simulink file and a photo of the T_out scope and the model as it appears after the simulation has completed.
I am not very familiar with Simulink, so please be thorough with your explanations. Thanks! I’m attempting to simulate a thermosiphon in Simulink using a 2P Condenser operating in ambient, moist air at 20 C. I’ve had a lot of problems with the simulation’s initial values converging, but I think I’ve been able to knock those out by adjusting the reservoir properties downstream to atmospheric temperature and pressure water.
The problem I am having is that the outlet temperature of the condenser is somehow coming back to me lower than the ambient temperature of the cooling air flowing in. It’s always been slightly lower by about 1 or 2 degrees. For 80 C water vapour (quality 1) entering the heat exchanger, the temperature of the liquid (quality 0) leaving the condenser is 18.92 C. Why is this occurring? Clearly, it isn’t physical–what in the model is breaking?
I have attached the simulink file and a photo of the T_out scope and the model as it appears after the simulation has completed.
I am not very familiar with Simulink, so please be thorough with your explanations. Thanks! simulink, simscape MATLAB Answers — New Questions
错误使用 rlDeterministicActorRepresentation。Observation names must match the names of the deep neural network’s input layers.
% Create Environment
env = MYEnv();
% Define State and Action Specifications
stateSpec = env.getObservationInfo();
actionSpec = env.getActionInfo();
stateName = stateSpec.Name;
% Create Actor Network
actorNetwork = [
featureInputLayer(stateSpec.Dimension(1), ‘Name’, stateName)
fullyConnectedLayer(400, ‘Name’, ‘ActorHiddenLayer1’)
reluLayer(‘Name’, ‘ActorReLU1’)
fullyConnectedLayer(300, ‘Name’, ‘ActorHiddenLayer2’)
reluLayer(‘Name’, ‘ActorReLU2’)
fullyConnectedLayer(actionSpec.Dimension(1), ‘Name’, ‘ActorOutputLayer’)
tanhLayer(‘Name’, ‘ActorTanh’)
];
% Create Critic Network
criticNetwork = [
featureInputLayer(stateSpec.Dimension(1), ‘Name’, stateName)
fullyConnectedLayer(400, ‘Name’, ‘CriticHiddenLayer1’)
reluLayer(‘Name’, ‘CriticReLU1’)
fullyConnectedLayer(300, ‘Name’, ‘CriticHiddenLayer2’)
reluLayer(‘Name’, ‘CriticReLU2’)
fullyConnectedLayer(1, ‘Name’, ‘CriticOutputLayer’)
];
% Create Actor Representation
actorOpts = rlRepresentationOptions(‘LearnRate’, actorLearningRate);
actor = rlDeterministicActorRepresentation(actorNetwork, stateSpec, actionSpec, actorOpts);% Create Environment
env = MYEnv();
% Define State and Action Specifications
stateSpec = env.getObservationInfo();
actionSpec = env.getActionInfo();
stateName = stateSpec.Name;
% Create Actor Network
actorNetwork = [
featureInputLayer(stateSpec.Dimension(1), ‘Name’, stateName)
fullyConnectedLayer(400, ‘Name’, ‘ActorHiddenLayer1’)
reluLayer(‘Name’, ‘ActorReLU1’)
fullyConnectedLayer(300, ‘Name’, ‘ActorHiddenLayer2’)
reluLayer(‘Name’, ‘ActorReLU2’)
fullyConnectedLayer(actionSpec.Dimension(1), ‘Name’, ‘ActorOutputLayer’)
tanhLayer(‘Name’, ‘ActorTanh’)
];
% Create Critic Network
criticNetwork = [
featureInputLayer(stateSpec.Dimension(1), ‘Name’, stateName)
fullyConnectedLayer(400, ‘Name’, ‘CriticHiddenLayer1’)
reluLayer(‘Name’, ‘CriticReLU1’)
fullyConnectedLayer(300, ‘Name’, ‘CriticHiddenLayer2’)
reluLayer(‘Name’, ‘CriticReLU2’)
fullyConnectedLayer(1, ‘Name’, ‘CriticOutputLayer’)
];
% Create Actor Representation
actorOpts = rlRepresentationOptions(‘LearnRate’, actorLearningRate);
actor = rlDeterministicActorRepresentation(actorNetwork, stateSpec, actionSpec, actorOpts); % Create Environment
env = MYEnv();
% Define State and Action Specifications
stateSpec = env.getObservationInfo();
actionSpec = env.getActionInfo();
stateName = stateSpec.Name;
% Create Actor Network
actorNetwork = [
featureInputLayer(stateSpec.Dimension(1), ‘Name’, stateName)
fullyConnectedLayer(400, ‘Name’, ‘ActorHiddenLayer1’)
reluLayer(‘Name’, ‘ActorReLU1’)
fullyConnectedLayer(300, ‘Name’, ‘ActorHiddenLayer2’)
reluLayer(‘Name’, ‘ActorReLU2’)
fullyConnectedLayer(actionSpec.Dimension(1), ‘Name’, ‘ActorOutputLayer’)
tanhLayer(‘Name’, ‘ActorTanh’)
];
% Create Critic Network
criticNetwork = [
featureInputLayer(stateSpec.Dimension(1), ‘Name’, stateName)
fullyConnectedLayer(400, ‘Name’, ‘CriticHiddenLayer1’)
reluLayer(‘Name’, ‘CriticReLU1’)
fullyConnectedLayer(300, ‘Name’, ‘CriticHiddenLayer2’)
reluLayer(‘Name’, ‘CriticReLU2’)
fullyConnectedLayer(1, ‘Name’, ‘CriticOutputLayer’)
];
% Create Actor Representation
actorOpts = rlRepresentationOptions(‘LearnRate’, actorLearningRate);
actor = rlDeterministicActorRepresentation(actorNetwork, stateSpec, actionSpec, actorOpts); observation names, rldeterministicactorrepresentation MATLAB Answers — New Questions
How to export AFM image to a data matrix?
I have exported .mi file of AFM data to .jpeg format using gwyddion software. I have attached the image. In this image, each pixel contains z-axis values or surface topography values (color coded). The maximum height of particles is 18 nm and minimum is 0. I would like to export this image into a 3D data matrix which contains information about X, Y and Z-axes values. Can anyone help to find a way?I have exported .mi file of AFM data to .jpeg format using gwyddion software. I have attached the image. In this image, each pixel contains z-axis values or surface topography values (color coded). The maximum height of particles is 18 nm and minimum is 0. I would like to export this image into a 3D data matrix which contains information about X, Y and Z-axes values. Can anyone help to find a way? I have exported .mi file of AFM data to .jpeg format using gwyddion software. I have attached the image. In this image, each pixel contains z-axis values or surface topography values (color coded). The maximum height of particles is 18 nm and minimum is 0. I would like to export this image into a 3D data matrix which contains information about X, Y and Z-axes values. Can anyone help to find a way? afm, image processing, image analysis MATLAB Answers — New Questions
Problem within App Designer when selecting Label and UITable (Multiple Selection)
When selecting a Label and then a UITable (Multiple Selection) in App Designer (R2024a), Table selection does not work properly until App Designer full resart (not Matlab). Closing and re-opening the Project does not fix it.
More specifically, the Table can be selected and moved but the Properties section remains at the previously selected component.
It affects all UITable components, not only the one used for multiple selection.
This can be reproduced with a new App a UITable and a Label. See screenshots.When selecting a Label and then a UITable (Multiple Selection) in App Designer (R2024a), Table selection does not work properly until App Designer full resart (not Matlab). Closing and re-opening the Project does not fix it.
More specifically, the Table can be selected and moved but the Properties section remains at the previously selected component.
It affects all UITable components, not only the one used for multiple selection.
This can be reproduced with a new App a UITable and a Label. See screenshots. When selecting a Label and then a UITable (Multiple Selection) in App Designer (R2024a), Table selection does not work properly until App Designer full resart (not Matlab). Closing and re-opening the Project does not fix it.
More specifically, the Table can be selected and moved but the Properties section remains at the previously selected component.
It affects all UITable components, not only the one used for multiple selection.
This can be reproduced with a new App a UITable and a Label. See screenshots. app designer, uitable, label, multiple selection, bug MATLAB Answers — New Questions
Relationship between back EMF (Ke) and maximum achievable speed
Is there a standard relationship between DC bus voltage and the maximum achivable speed, from which we can calculate the maximum achvable speed of a PMSM motor given the DC bus voltage?
Looking at this thread:
https://e2e.ti.com/support/motor-drivers-group/motor-drivers/f/motor-drivers-forum/1271711/mcf8315a-speed-control-issue
Is the formula given there a valid equation for a general FOC controller?
Eletrical frequency = (DC bus / sqrt(3))/Ke ?
We are trying to run the Motor driver from a C2000 LaunchPad (LAUNCHXL-F28379D + BOOSTXL-3PHGANINV)
https://www.mathworks.com/help/mcb/gs/matlab-project-foc-pmsm-qep.htmlIs there a standard relationship between DC bus voltage and the maximum achivable speed, from which we can calculate the maximum achvable speed of a PMSM motor given the DC bus voltage?
Looking at this thread:
https://e2e.ti.com/support/motor-drivers-group/motor-drivers/f/motor-drivers-forum/1271711/mcf8315a-speed-control-issue
Is the formula given there a valid equation for a general FOC controller?
Eletrical frequency = (DC bus / sqrt(3))/Ke ?
We are trying to run the Motor driver from a C2000 LaunchPad (LAUNCHXL-F28379D + BOOSTXL-3PHGANINV)
https://www.mathworks.com/help/mcb/gs/matlab-project-foc-pmsm-qep.html Is there a standard relationship between DC bus voltage and the maximum achivable speed, from which we can calculate the maximum achvable speed of a PMSM motor given the DC bus voltage?
Looking at this thread:
https://e2e.ti.com/support/motor-drivers-group/motor-drivers/f/motor-drivers-forum/1271711/mcf8315a-speed-control-issue
Is the formula given there a valid equation for a general FOC controller?
Eletrical frequency = (DC bus / sqrt(3))/Ke ?
We are trying to run the Motor driver from a C2000 LaunchPad (LAUNCHXL-F28379D + BOOSTXL-3PHGANINV)
https://www.mathworks.com/help/mcb/gs/matlab-project-foc-pmsm-qep.html foc, pmsm MATLAB Answers — New Questions
how to save my 3d matrix in X,Y,Z coordinates
I have 134* 2d matrix (86*86 each) and they make 86*86*134 matrix.
I need to generate a point cloud of this matrix and that is why I must save the Matrix in xyz coordinates.
how can I save the matrix (I) in xyz table
my matrix (I) was generated by the following code
clear all
close all
names=dir(‘inter the name of your file*.tiff’);
for iii=1:size(names,1)
I(:,:,iii)=imread(strcat(‘inter the name of your file’,names(iii).name));
for j=1:size(names,1)
Img_3D=surface(‘XData’,[0 355;0 355],’YData’,[0 0;355 355],’ZData’,[29.85*j 29.85*j;29.85*j 29.85*j], ‘CData’ ,flipdim(im2double(I(:,:,iii)),1),’FaceColor’,’texturemap’,’EdgeColor’,’none’);
colormap(gray)
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z µm’)
end
endI have 134* 2d matrix (86*86 each) and they make 86*86*134 matrix.
I need to generate a point cloud of this matrix and that is why I must save the Matrix in xyz coordinates.
how can I save the matrix (I) in xyz table
my matrix (I) was generated by the following code
clear all
close all
names=dir(‘inter the name of your file*.tiff’);
for iii=1:size(names,1)
I(:,:,iii)=imread(strcat(‘inter the name of your file’,names(iii).name));
for j=1:size(names,1)
Img_3D=surface(‘XData’,[0 355;0 355],’YData’,[0 0;355 355],’ZData’,[29.85*j 29.85*j;29.85*j 29.85*j], ‘CData’ ,flipdim(im2double(I(:,:,iii)),1),’FaceColor’,’texturemap’,’EdgeColor’,’none’);
colormap(gray)
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z µm’)
end
end I have 134* 2d matrix (86*86 each) and they make 86*86*134 matrix.
I need to generate a point cloud of this matrix and that is why I must save the Matrix in xyz coordinates.
how can I save the matrix (I) in xyz table
my matrix (I) was generated by the following code
clear all
close all
names=dir(‘inter the name of your file*.tiff’);
for iii=1:size(names,1)
I(:,:,iii)=imread(strcat(‘inter the name of your file’,names(iii).name));
for j=1:size(names,1)
Img_3D=surface(‘XData’,[0 355;0 355],’YData’,[0 0;355 355],’ZData’,[29.85*j 29.85*j;29.85*j 29.85*j], ‘CData’ ,flipdim(im2double(I(:,:,iii)),1),’FaceColor’,’texturemap’,’EdgeColor’,’none’);
colormap(gray)
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z µm’)
end
end image-processing, 3d matrix MATLAB Answers — New Questions
Diode fitting with 5 parameters
I used fsolve function (advised by Mischa Kim) to solve the diode equation and it worked (with small modification on (q/nkT).
fun = @(I) Il – Io * exp((V + I*R)/(n*kT_q)) – (V + I*R)/S – I;
Now I need to do a fitting using the same equation but this time I need Matlab to iterate the values for:
Il , Io, R, n, S,
in order to solve I which will give me the best fit against the experimental I (Iexp) where V is the independent variable. I guess I will need the least square function for that but first how do I ask Matlab to do the iteration and eventually solve the I?
Thank you very much for your help.
RosemarieI used fsolve function (advised by Mischa Kim) to solve the diode equation and it worked (with small modification on (q/nkT).
fun = @(I) Il – Io * exp((V + I*R)/(n*kT_q)) – (V + I*R)/S – I;
Now I need to do a fitting using the same equation but this time I need Matlab to iterate the values for:
Il , Io, R, n, S,
in order to solve I which will give me the best fit against the experimental I (Iexp) where V is the independent variable. I guess I will need the least square function for that but first how do I ask Matlab to do the iteration and eventually solve the I?
Thank you very much for your help.
Rosemarie I used fsolve function (advised by Mischa Kim) to solve the diode equation and it worked (with small modification on (q/nkT).
fun = @(I) Il – Io * exp((V + I*R)/(n*kT_q)) – (V + I*R)/S – I;
Now I need to do a fitting using the same equation but this time I need Matlab to iterate the values for:
Il , Io, R, n, S,
in order to solve I which will give me the best fit against the experimental I (Iexp) where V is the independent variable. I guess I will need the least square function for that but first how do I ask Matlab to do the iteration and eventually solve the I?
Thank you very much for your help.
Rosemarie diode equation MATLAB Answers — New Questions
Error: output is inferred as a variable-size matrix, but its size is specified as inherited or fixed.
To simplify the question, when I define the size of my output based on a constant input (it won’t change during the simulation), i receive the following error: ‘y’ is inferred as a variable-size matrix, but its size is specified as inherited or fixed. Verify ‘y’ is defined in terms of non-tunable parameters, or select the ‘Variable Size’ check box and specify the upper bounds in the Size box.
Other people had this problem but I couldn’t really find a way to fix it. I can’t select the variable size check box because it lead to other errors. I also don’t have the coder library. I got that in theory this constant value can me modified and then cause problems, but it isn’t my case, I just want to define it when the simulation starts.
function y = fcn(u)
y = zeros(u,1);To simplify the question, when I define the size of my output based on a constant input (it won’t change during the simulation), i receive the following error: ‘y’ is inferred as a variable-size matrix, but its size is specified as inherited or fixed. Verify ‘y’ is defined in terms of non-tunable parameters, or select the ‘Variable Size’ check box and specify the upper bounds in the Size box.
Other people had this problem but I couldn’t really find a way to fix it. I can’t select the variable size check box because it lead to other errors. I also don’t have the coder library. I got that in theory this constant value can me modified and then cause problems, but it isn’t my case, I just want to define it when the simulation starts.
function y = fcn(u)
y = zeros(u,1); To simplify the question, when I define the size of my output based on a constant input (it won’t change during the simulation), i receive the following error: ‘y’ is inferred as a variable-size matrix, but its size is specified as inherited or fixed. Verify ‘y’ is defined in terms of non-tunable parameters, or select the ‘Variable Size’ check box and specify the upper bounds in the Size box.
Other people had this problem but I couldn’t really find a way to fix it. I can’t select the variable size check box because it lead to other errors. I also don’t have the coder library. I got that in theory this constant value can me modified and then cause problems, but it isn’t my case, I just want to define it when the simulation starts.
function y = fcn(u)
y = zeros(u,1); error, simulink, variables, matlab function MATLAB Answers — New Questions
code to sample a signal
x(t)=cos(180*π*t) at sampling rates of 200 and 1500 samples each second. Then plot the graphs.x(t)=cos(180*π*t) at sampling rates of 200 and 1500 samples each second. Then plot the graphs. x(t)=cos(180*π*t) at sampling rates of 200 and 1500 samples each second. Then plot the graphs. sampling MATLAB Answers — New Questions
How to normalize the scale of an image to make it scaling invariant?
I want to make my image to be scaling invariant by normalizing the scale.I want to make my image to be scaling invariant by normalizing the scale. I want to make my image to be scaling invariant by normalizing the scale. scale normalization MATLAB Answers — New Questions
Curve fitting 3d closed surface
I am trying to curve fit a 3d surface. However, I would like to fit a closed 3d surface onto the points I have in 3d space (ie a sphere, ellisoid, whatever it may be). Is there an easy way to do this with Matlab or any toolbox? I’ve seen curve fitting toolbox but it doesn’t look like it would fit a closed 3d surface since the curve fitting looks polynomial based. Thanks in advance.I am trying to curve fit a 3d surface. However, I would like to fit a closed 3d surface onto the points I have in 3d space (ie a sphere, ellisoid, whatever it may be). Is there an easy way to do this with Matlab or any toolbox? I’ve seen curve fitting toolbox but it doesn’t look like it would fit a closed 3d surface since the curve fitting looks polynomial based. Thanks in advance. I am trying to curve fit a 3d surface. However, I would like to fit a closed 3d surface onto the points I have in 3d space (ie a sphere, ellisoid, whatever it may be). Is there an easy way to do this with Matlab or any toolbox? I’ve seen curve fitting toolbox but it doesn’t look like it would fit a closed 3d surface since the curve fitting looks polynomial based. Thanks in advance. curve fitting, 3d plots MATLAB Answers — New Questions
unable to find signing program ‘smimesign’
Hello! I’m trying to set up git according to this article Set Up Git Source Control. After implementing this step "Enable Signing Commits" including,
“`
!git config –global commit.gpgsign true
!git config –global user.signingkey 3AB5C344325645B2
!git config –global gpg.format x509
!git config –global gpg.x509.program smimesign
“`
The error, unable to find signing program ‘smimesign’, take place while I trying to commit. And the error will be solved by command this,
“`
>> !git config –global –unset gpg.x509.program
>> !git config –global –unset gpg.format
>> !git config –global –unset commit.gpgsign
>> !git config –global –unset user.signingkey
“`Hello! I’m trying to set up git according to this article Set Up Git Source Control. After implementing this step "Enable Signing Commits" including,
“`
!git config –global commit.gpgsign true
!git config –global user.signingkey 3AB5C344325645B2
!git config –global gpg.format x509
!git config –global gpg.x509.program smimesign
“`
The error, unable to find signing program ‘smimesign’, take place while I trying to commit. And the error will be solved by command this,
“`
>> !git config –global –unset gpg.x509.program
>> !git config –global –unset gpg.format
>> !git config –global –unset commit.gpgsign
>> !git config –global –unset user.signingkey
“` Hello! I’m trying to set up git according to this article Set Up Git Source Control. After implementing this step "Enable Signing Commits" including,
“`
!git config –global commit.gpgsign true
!git config –global user.signingkey 3AB5C344325645B2
!git config –global gpg.format x509
!git config –global gpg.x509.program smimesign
“`
The error, unable to find signing program ‘smimesign’, take place while I trying to commit. And the error will be solved by command this,
“`
>> !git config –global –unset gpg.x509.program
>> !git config –global –unset gpg.format
>> !git config –global –unset commit.gpgsign
>> !git config –global –unset user.signingkey
“` git, commit MATLAB Answers — New Questions
How do I change the display language of Optimize LIVE Editor task?
Hi, I’m using Optimize LIVE Editor task on Matlab 2022b, and the display language of Matlab on my PC is Chinese.
But the display of Optimize LIVE Editor task is mainly in English and partially in Chinese. I see all—Chinese version of Optimize LIVE Editor task from the internet. How do I change the language to all Chinese? Would appreciate any help!Hi, I’m using Optimize LIVE Editor task on Matlab 2022b, and the display language of Matlab on my PC is Chinese.
But the display of Optimize LIVE Editor task is mainly in English and partially in Chinese. I see all—Chinese version of Optimize LIVE Editor task from the internet. How do I change the language to all Chinese? Would appreciate any help! Hi, I’m using Optimize LIVE Editor task on Matlab 2022b, and the display language of Matlab on my PC is Chinese.
But the display of Optimize LIVE Editor task is mainly in English and partially in Chinese. I see all—Chinese version of Optimize LIVE Editor task from the internet. How do I change the language to all Chinese? Would appreciate any help! display language, matlab, optimization toolbox MATLAB Answers — New Questions
RoadRunner HD Map create
Building a loadrunner hd map in the c++ language.
I have a problem defining the lane boundary, so I would like to ask you a question.
I defined it in terms of coordinates, and it comes out like this..
The solid orange line is the next boundary.
Is there a separate method for designating lane boundary coordinates?
If not, is there any document to refer to?
Do I have to define lanes, boundaries, and signs daily when building hd maps?Building a loadrunner hd map in the c++ language.
I have a problem defining the lane boundary, so I would like to ask you a question.
I defined it in terms of coordinates, and it comes out like this..
The solid orange line is the next boundary.
Is there a separate method for designating lane boundary coordinates?
If not, is there any document to refer to?
Do I have to define lanes, boundaries, and signs daily when building hd maps? Building a loadrunner hd map in the c++ language.
I have a problem defining the lane boundary, so I would like to ask you a question.
I defined it in terms of coordinates, and it comes out like this..
The solid orange line is the next boundary.
Is there a separate method for designating lane boundary coordinates?
If not, is there any document to refer to?
Do I have to define lanes, boundaries, and signs daily when building hd maps? roadrunner, hdmap, custom, custom data using, c++ MATLAB Answers — New Questions