Tag Archives: matlab
How to use Individual License file in MATLAB Docker?
Hello, I am trying to use my Individual License file in a MATLAB Docker container but I get the error of ‘hostid of your computer does not match the hostid of your license file’.
I can login to the container by using my email and password but this is NOT ideal since the login session expires after some time and need to relogin again. I want to run this headless so if I can pass in a license file then I don’t have to keep logging in manually.
I downloaded the Individual License file from the online License Center portal Install and Activate tab. This downloaded a license.lic file which I pass into the Docker container.
My Docker run command:
docker run -it –rm -p 5901:5901 -p 6080:6080 -v ~/ivy:/ivy -e MLM_LICENSE_FILE=/ivy/license.lic mathworks/matlab:r2021b -vnc
License error:Hello, I am trying to use my Individual License file in a MATLAB Docker container but I get the error of ‘hostid of your computer does not match the hostid of your license file’.
I can login to the container by using my email and password but this is NOT ideal since the login session expires after some time and need to relogin again. I want to run this headless so if I can pass in a license file then I don’t have to keep logging in manually.
I downloaded the Individual License file from the online License Center portal Install and Activate tab. This downloaded a license.lic file which I pass into the Docker container.
My Docker run command:
docker run -it –rm -p 5901:5901 -p 6080:6080 -v ~/ivy:/ivy -e MLM_LICENSE_FILE=/ivy/license.lic mathworks/matlab:r2021b -vnc
License error: Hello, I am trying to use my Individual License file in a MATLAB Docker container but I get the error of ‘hostid of your computer does not match the hostid of your license file’.
I can login to the container by using my email and password but this is NOT ideal since the login session expires after some time and need to relogin again. I want to run this headless so if I can pass in a license file then I don’t have to keep logging in manually.
I downloaded the Individual License file from the online License Center portal Install and Activate tab. This downloaded a license.lic file which I pass into the Docker container.
My Docker run command:
docker run -it –rm -p 5901:5901 -p 6080:6080 -v ~/ivy:/ivy -e MLM_LICENSE_FILE=/ivy/license.lic mathworks/matlab:r2021b -vnc
License error: docker, license MATLAB Answers — New Questions
Library mblibv1 not found in R2020a
I am using MATLAB R2020a where SimScape libraries are also installed. But I couldn’t find mbliv1 library. Can you please let me know where can I find it? Whether it is deprecated in R2020a?I am using MATLAB R2020a where SimScape libraries are also installed. But I couldn’t find mbliv1 library. Can you please let me know where can I find it? Whether it is deprecated in R2020a? I am using MATLAB R2020a where SimScape libraries are also installed. But I couldn’t find mbliv1 library. Can you please let me know where can I find it? Whether it is deprecated in R2020a? simscape MATLAB Answers — New Questions
How can I use a previous version of Matlab ? I using Matlab 2022b and I would like to run some script in a previous version 2021a. Thanks
How can I use a previous version of Matlab ? I using Matlab 2022b and I would like to run some script in a previous version 2021a.
ThanksHow can I use a previous version of Matlab ? I using Matlab 2022b and I would like to run some script in a previous version 2021a.
Thanks How can I use a previous version of Matlab ? I using Matlab 2022b and I would like to run some script in a previous version 2021a.
Thanks matlab version MATLAB Answers — New Questions
How can I export Roboflow annotation to work in Matlab
Hello! I’m using annotations to create bounding boxes on my images to train a model. To export the dataset created on Roboflow, we can export in different ways, like COCO segmentation Json files, or TXT YOLO oriented bounding boxes, or CSV tensorflow/ CSV keras. The downloaded files comes with the images and labels created in train, test and validation. So I have the images, the labels with coordinates from each image that I’m creating the Annotation. But I don’t know how am I work with those files on Matlab. Anyone can help me with this problem?Hello! I’m using annotations to create bounding boxes on my images to train a model. To export the dataset created on Roboflow, we can export in different ways, like COCO segmentation Json files, or TXT YOLO oriented bounding boxes, or CSV tensorflow/ CSV keras. The downloaded files comes with the images and labels created in train, test and validation. So I have the images, the labels with coordinates from each image that I’m creating the Annotation. But I don’t know how am I work with those files on Matlab. Anyone can help me with this problem? Hello! I’m using annotations to create bounding boxes on my images to train a model. To export the dataset created on Roboflow, we can export in different ways, like COCO segmentation Json files, or TXT YOLO oriented bounding boxes, or CSV tensorflow/ CSV keras. The downloaded files comes with the images and labels created in train, test and validation. So I have the images, the labels with coordinates from each image that I’m creating the Annotation. But I don’t know how am I work with those files on Matlab. Anyone can help me with this problem? matlab, deep learning, neural network, neural networks, machine learning, image processing MATLAB Answers — New Questions
How can i encrypt image by xoring?
How can i encrypt image by xoring?How can i encrypt image by xoring? How can i encrypt image by xoring? af MATLAB Answers — New Questions
Difference between local time and “created_at
Hello
The time returned by "created_at" does not correspond to the local time
e.g. 18:54:33.401 -> Message:{"channel_id":2499901, "created_at": "2024-08-21T16:54:31Z"….}
although my profile is correctly filled in, the time indicated on the plot is correct
Should I add the term: ?timezone = Europe%2FParis
if where please I do not have a field in "channel setting" to add it
Thank you in advance.Hello
The time returned by "created_at" does not correspond to the local time
e.g. 18:54:33.401 -> Message:{"channel_id":2499901, "created_at": "2024-08-21T16:54:31Z"….}
although my profile is correctly filled in, the time indicated on the plot is correct
Should I add the term: ?timezone = Europe%2FParis
if where please I do not have a field in "channel setting" to add it
Thank you in advance. Hello
The time returned by "created_at" does not correspond to the local time
e.g. 18:54:33.401 -> Message:{"channel_id":2499901, "created_at": "2024-08-21T16:54:31Z"….}
although my profile is correctly filled in, the time indicated on the plot is correct
Should I add the term: ?timezone = Europe%2FParis
if where please I do not have a field in "channel setting" to add it
Thank you in advance. timezone MATLAB Answers — New Questions
Two step ahead autoregressive prediction
Is it possible to use the AR function in Matlab to train models such as:
y(t+2)=a(1)u(t-1)+a(2)u(t-2)+…+a(p)u(t-p)
rather than:
y(t+1)=a(1)u(t-1)+a(2)u(t-2)+…+a(p)u(t-p)
I want to avoid predicting y(t+2) using y(t+1).
Many thanksIs it possible to use the AR function in Matlab to train models such as:
y(t+2)=a(1)u(t-1)+a(2)u(t-2)+…+a(p)u(t-p)
rather than:
y(t+1)=a(1)u(t-1)+a(2)u(t-2)+…+a(p)u(t-p)
I want to avoid predicting y(t+2) using y(t+1).
Many thanks Is it possible to use the AR function in Matlab to train models such as:
y(t+2)=a(1)u(t-1)+a(2)u(t-2)+…+a(p)u(t-p)
rather than:
y(t+1)=a(1)u(t-1)+a(2)u(t-2)+…+a(p)u(t-p)
I want to avoid predicting y(t+2) using y(t+1).
Many thanks matlab, autoregression MATLAB Answers — New Questions
Problem running spm12 using R2019a on Centos 7
When I issue the spm command, it displays the startup window. After clicking on a button, I get:
(MATLAB:374189): GLib-GObject-WARNING **: 09:26:25.382: cannot register existing type ‘GtkObject’
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.382: g_type_register_static: assertion ‘parent_type > 0’ failed
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.382: g_type_add_interface_static: assertion ‘G_TYPE_IS_INSTANTIATABLE (instance_type)’ failed
(MATLAB:374189): GLib-GObject-WARNING **: 09:26:25.382: cannot register existing type ‘GtkBuildable’
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.382: g_type_interface_add_prerequisite: assertion ‘G_TYPE_IS_INTERFACE (interface_type)’ failed
(MATLAB:374189): GLib-CRITICAL **: 09:26:25.382: g_once_init_leave: assertion ‘result != 0’ failed
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.382: g_type_add_interface_static: assertion ‘G_TYPE_IS_INSTANTIATABLE (instance_type)’ failed
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.383: g_type_register_static: assertion ‘parent_type > 0’ failed
and then it freezes.
OS: Linux 3.10.0-957.el7.x86_64
Compiler: gcc 6.3.0
Glib: 2.42.2
Java: 1.8.0_211
Any ideas on what needs to be fixed?When I issue the spm command, it displays the startup window. After clicking on a button, I get:
(MATLAB:374189): GLib-GObject-WARNING **: 09:26:25.382: cannot register existing type ‘GtkObject’
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.382: g_type_register_static: assertion ‘parent_type > 0’ failed
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.382: g_type_add_interface_static: assertion ‘G_TYPE_IS_INSTANTIATABLE (instance_type)’ failed
(MATLAB:374189): GLib-GObject-WARNING **: 09:26:25.382: cannot register existing type ‘GtkBuildable’
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.382: g_type_interface_add_prerequisite: assertion ‘G_TYPE_IS_INTERFACE (interface_type)’ failed
(MATLAB:374189): GLib-CRITICAL **: 09:26:25.382: g_once_init_leave: assertion ‘result != 0’ failed
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.382: g_type_add_interface_static: assertion ‘G_TYPE_IS_INSTANTIATABLE (instance_type)’ failed
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.383: g_type_register_static: assertion ‘parent_type > 0’ failed
and then it freezes.
OS: Linux 3.10.0-957.el7.x86_64
Compiler: gcc 6.3.0
Glib: 2.42.2
Java: 1.8.0_211
Any ideas on what needs to be fixed? When I issue the spm command, it displays the startup window. After clicking on a button, I get:
(MATLAB:374189): GLib-GObject-WARNING **: 09:26:25.382: cannot register existing type ‘GtkObject’
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.382: g_type_register_static: assertion ‘parent_type > 0’ failed
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.382: g_type_add_interface_static: assertion ‘G_TYPE_IS_INSTANTIATABLE (instance_type)’ failed
(MATLAB:374189): GLib-GObject-WARNING **: 09:26:25.382: cannot register existing type ‘GtkBuildable’
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.382: g_type_interface_add_prerequisite: assertion ‘G_TYPE_IS_INTERFACE (interface_type)’ failed
(MATLAB:374189): GLib-CRITICAL **: 09:26:25.382: g_once_init_leave: assertion ‘result != 0’ failed
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.382: g_type_add_interface_static: assertion ‘G_TYPE_IS_INSTANTIATABLE (instance_type)’ failed
(MATLAB:374189): GLib-GObject-CRITICAL **: 09:26:25.383: g_type_register_static: assertion ‘parent_type > 0’ failed
and then it freezes.
OS: Linux 3.10.0-957.el7.x86_64
Compiler: gcc 6.3.0
Glib: 2.42.2
Java: 1.8.0_211
Any ideas on what needs to be fixed? spm 12, r2019a, centos7 MATLAB Answers — New Questions
Unable to perform assignment because value of type ‘optim.problemdef.OptimizationExpression’ is not convertible to ‘double’.
Hello!
I’m working on an optimization problem where I need to manage the availability of multiple cores for task execution. My current approach involves finding the earliest available core and updating its availability after assigning a task. However, I’m encountering an issue when trying to update the hapsCoreAvailability array with the new start time and execution time.
the error is
Unable to perform assignment because value of type ‘optim.problemdef.OptimizationExpression’ is not convertible to
‘double’.
Error in Solve_Linear_Problem (line 355)
hapsCoreAvailability(coreIdx) = T_start + execTime;
Caused by:
Error using double
Conversion to double from optim.problemdef.OptimizationExpression is not possible.
here is the code
% Initialize the queue time matrix
Queue_time = optimexpr(N, numNodes, num_vehicles);
% Define variables
T_start = optimvar(‘T_start’, 1, ‘Type’, ‘continuous’, ‘LowerBound’, 0);
% Constraints
Queue_constraints1 = [];
Queue_constraints2 = [];
% Track availability of each HAPS core
hapsCoreAvailability = zeros(1, hapsCapacity);
nodeQueues = cell(numNodes, 1); % Queue times for each node
% Process tasks by generation time
for taskIdx = 1:num_vehicles
for subtaskIdx = 1:N
for nodeIdx = 1:numNodes
% Extract generation time, execution time, and uplink time
taskGenTime = generation_times_matrix(subtaskIdx, nodeIdx, taskIdx);
execTime = Execution_time(subtaskIdx, nodeIdx, taskIdx);
uplinkTime = uplink_time(subtaskIdx, nodeIdx, taskIdx);
% Calculate task arrival time considering uplink time
taskArrivalTime = taskGenTime + uplinkTime;
if nodeIdx == 4 % If assigned to HAPS
% Find the earliest available core
% [earliestCoreTime, coreIdx] = min(hapsCoreAvailability);
coreIdx = -1;
earliestCoreTime = inf;
% Iterate through each core’s availability time
for i = 1:length(hapsCoreAvailability)
% Check if the current core’s availability is earlier than the current earliest time
if hapsCoreAvailability(i) < earliestCoreTime
% Update earliest core time and index
earliestCoreTime = hapsCoreAvailability(i);
coreIdx = i;
end
end
% Start time is the maximum of arrival time and core availability
% T_start should be greater than or equal to both T_arrival and T_core
Queue_constraints1 = [Queue_constraints1, T_start >= taskArrivalTime];
Queue_constraints1 = [Queue_constraints1, T_start >= earliestCoreTime];
Queue_time(subtaskIdx, nodeIdx, taskIdx) = T_start – taskArrivalTime;
% Update the core availability time
hapsCoreAvailability(coreIdx) = T_start + execTime; %% here is the error
else % For UAVs
% Queue tasks based on previous completion
if isempty(nodeQueues{nodeIdx})
startTime = taskArrivalTime;
else
T_queue = nodeQueues{nodeIdx}(end);
% T_start should be greater than or equal to both T_arrival and T_queue
Queue_constraints2 = [Queue_constraints2, T_start >= taskArrivalTime];
Queue_constraints2 = [Queue_constraints2, T_start >= T_queue];
end
% Calculate the queue time for the current subtask
Queue_time(subtaskIdx, nodeIdx, taskIdx) = T_start – taskArrivalTime;
% Update departure time for the current subtask
departureTime = T_start + execTime;
nodeQueues{nodeIdx} = [nodeQueues{nodeIdx}, departureTime];
end
end
end
end
prob.Constraints.queue_time_constraints = Queue_constraints1;
prob.Constraints.queue_time_constraints = Queue_constraints2;
How can I correctly update the hapsCoreAvailability array with the new start time and execution time in the context of my optimization problem? Is there an alternative way to manage and update core availability when dealing with OptimizationExpression objects?
Any advice or suggestions would be greatly appreciated!
Thank you!Hello!
I’m working on an optimization problem where I need to manage the availability of multiple cores for task execution. My current approach involves finding the earliest available core and updating its availability after assigning a task. However, I’m encountering an issue when trying to update the hapsCoreAvailability array with the new start time and execution time.
the error is
Unable to perform assignment because value of type ‘optim.problemdef.OptimizationExpression’ is not convertible to
‘double’.
Error in Solve_Linear_Problem (line 355)
hapsCoreAvailability(coreIdx) = T_start + execTime;
Caused by:
Error using double
Conversion to double from optim.problemdef.OptimizationExpression is not possible.
here is the code
% Initialize the queue time matrix
Queue_time = optimexpr(N, numNodes, num_vehicles);
% Define variables
T_start = optimvar(‘T_start’, 1, ‘Type’, ‘continuous’, ‘LowerBound’, 0);
% Constraints
Queue_constraints1 = [];
Queue_constraints2 = [];
% Track availability of each HAPS core
hapsCoreAvailability = zeros(1, hapsCapacity);
nodeQueues = cell(numNodes, 1); % Queue times for each node
% Process tasks by generation time
for taskIdx = 1:num_vehicles
for subtaskIdx = 1:N
for nodeIdx = 1:numNodes
% Extract generation time, execution time, and uplink time
taskGenTime = generation_times_matrix(subtaskIdx, nodeIdx, taskIdx);
execTime = Execution_time(subtaskIdx, nodeIdx, taskIdx);
uplinkTime = uplink_time(subtaskIdx, nodeIdx, taskIdx);
% Calculate task arrival time considering uplink time
taskArrivalTime = taskGenTime + uplinkTime;
if nodeIdx == 4 % If assigned to HAPS
% Find the earliest available core
% [earliestCoreTime, coreIdx] = min(hapsCoreAvailability);
coreIdx = -1;
earliestCoreTime = inf;
% Iterate through each core’s availability time
for i = 1:length(hapsCoreAvailability)
% Check if the current core’s availability is earlier than the current earliest time
if hapsCoreAvailability(i) < earliestCoreTime
% Update earliest core time and index
earliestCoreTime = hapsCoreAvailability(i);
coreIdx = i;
end
end
% Start time is the maximum of arrival time and core availability
% T_start should be greater than or equal to both T_arrival and T_core
Queue_constraints1 = [Queue_constraints1, T_start >= taskArrivalTime];
Queue_constraints1 = [Queue_constraints1, T_start >= earliestCoreTime];
Queue_time(subtaskIdx, nodeIdx, taskIdx) = T_start – taskArrivalTime;
% Update the core availability time
hapsCoreAvailability(coreIdx) = T_start + execTime; %% here is the error
else % For UAVs
% Queue tasks based on previous completion
if isempty(nodeQueues{nodeIdx})
startTime = taskArrivalTime;
else
T_queue = nodeQueues{nodeIdx}(end);
% T_start should be greater than or equal to both T_arrival and T_queue
Queue_constraints2 = [Queue_constraints2, T_start >= taskArrivalTime];
Queue_constraints2 = [Queue_constraints2, T_start >= T_queue];
end
% Calculate the queue time for the current subtask
Queue_time(subtaskIdx, nodeIdx, taskIdx) = T_start – taskArrivalTime;
% Update departure time for the current subtask
departureTime = T_start + execTime;
nodeQueues{nodeIdx} = [nodeQueues{nodeIdx}, departureTime];
end
end
end
end
prob.Constraints.queue_time_constraints = Queue_constraints1;
prob.Constraints.queue_time_constraints = Queue_constraints2;
How can I correctly update the hapsCoreAvailability array with the new start time and execution time in the context of my optimization problem? Is there an alternative way to manage and update core availability when dealing with OptimizationExpression objects?
Any advice or suggestions would be greatly appreciated!
Thank you! Hello!
I’m working on an optimization problem where I need to manage the availability of multiple cores for task execution. My current approach involves finding the earliest available core and updating its availability after assigning a task. However, I’m encountering an issue when trying to update the hapsCoreAvailability array with the new start time and execution time.
the error is
Unable to perform assignment because value of type ‘optim.problemdef.OptimizationExpression’ is not convertible to
‘double’.
Error in Solve_Linear_Problem (line 355)
hapsCoreAvailability(coreIdx) = T_start + execTime;
Caused by:
Error using double
Conversion to double from optim.problemdef.OptimizationExpression is not possible.
here is the code
% Initialize the queue time matrix
Queue_time = optimexpr(N, numNodes, num_vehicles);
% Define variables
T_start = optimvar(‘T_start’, 1, ‘Type’, ‘continuous’, ‘LowerBound’, 0);
% Constraints
Queue_constraints1 = [];
Queue_constraints2 = [];
% Track availability of each HAPS core
hapsCoreAvailability = zeros(1, hapsCapacity);
nodeQueues = cell(numNodes, 1); % Queue times for each node
% Process tasks by generation time
for taskIdx = 1:num_vehicles
for subtaskIdx = 1:N
for nodeIdx = 1:numNodes
% Extract generation time, execution time, and uplink time
taskGenTime = generation_times_matrix(subtaskIdx, nodeIdx, taskIdx);
execTime = Execution_time(subtaskIdx, nodeIdx, taskIdx);
uplinkTime = uplink_time(subtaskIdx, nodeIdx, taskIdx);
% Calculate task arrival time considering uplink time
taskArrivalTime = taskGenTime + uplinkTime;
if nodeIdx == 4 % If assigned to HAPS
% Find the earliest available core
% [earliestCoreTime, coreIdx] = min(hapsCoreAvailability);
coreIdx = -1;
earliestCoreTime = inf;
% Iterate through each core’s availability time
for i = 1:length(hapsCoreAvailability)
% Check if the current core’s availability is earlier than the current earliest time
if hapsCoreAvailability(i) < earliestCoreTime
% Update earliest core time and index
earliestCoreTime = hapsCoreAvailability(i);
coreIdx = i;
end
end
% Start time is the maximum of arrival time and core availability
% T_start should be greater than or equal to both T_arrival and T_core
Queue_constraints1 = [Queue_constraints1, T_start >= taskArrivalTime];
Queue_constraints1 = [Queue_constraints1, T_start >= earliestCoreTime];
Queue_time(subtaskIdx, nodeIdx, taskIdx) = T_start – taskArrivalTime;
% Update the core availability time
hapsCoreAvailability(coreIdx) = T_start + execTime; %% here is the error
else % For UAVs
% Queue tasks based on previous completion
if isempty(nodeQueues{nodeIdx})
startTime = taskArrivalTime;
else
T_queue = nodeQueues{nodeIdx}(end);
% T_start should be greater than or equal to both T_arrival and T_queue
Queue_constraints2 = [Queue_constraints2, T_start >= taskArrivalTime];
Queue_constraints2 = [Queue_constraints2, T_start >= T_queue];
end
% Calculate the queue time for the current subtask
Queue_time(subtaskIdx, nodeIdx, taskIdx) = T_start – taskArrivalTime;
% Update departure time for the current subtask
departureTime = T_start + execTime;
nodeQueues{nodeIdx} = [nodeQueues{nodeIdx}, departureTime];
end
end
end
end
prob.Constraints.queue_time_constraints = Queue_constraints1;
prob.Constraints.queue_time_constraints = Queue_constraints2;
How can I correctly update the hapsCoreAvailability array with the new start time and execution time in the context of my optimization problem? Is there an alternative way to manage and update core availability when dealing with OptimizationExpression objects?
Any advice or suggestions would be greatly appreciated!
Thank you! optimization, multiple cores, parallel processing MATLAB Answers — New Questions
trainNetwork reports too many input arguments in 2024a
Transfer learning code, based on the help example, that runs in 2023b, fails in 2024a
Error using trainNetwork (line 191)
Too many input arguments.
What has changed in the 2024a version? I see that trainnet is now recommended and I can do that going forward, but I would expect old code still to run.Transfer learning code, based on the help example, that runs in 2023b, fails in 2024a
Error using trainNetwork (line 191)
Too many input arguments.
What has changed in the 2024a version? I see that trainnet is now recommended and I can do that going forward, but I would expect old code still to run. Transfer learning code, based on the help example, that runs in 2023b, fails in 2024a
Error using trainNetwork (line 191)
Too many input arguments.
What has changed in the 2024a version? I see that trainnet is now recommended and I can do that going forward, but I would expect old code still to run. trainnetwork MATLAB Answers — New Questions
I want to start a youtube channel where i develop flight control algorithms. Which matlab license do i need?
As per title. What license do I need to use MatLab for youtube videos? What happens if I make money (in the longterm) from those videos?As per title. What license do I need to use MatLab for youtube videos? What happens if I make money (in the longterm) from those videos? As per title. What license do I need to use MatLab for youtube videos? What happens if I make money (in the longterm) from those videos? matlab, simulink, license MATLAB Answers — New Questions
how to change the direction of this code from right falling into left to left falling into right
Post Content Post Content homework, graph MATLAB Answers — New Questions
array mask not being reset in application
In the attached app, there are 2 sliders for "set range low" and "set range high" which are used to change the scale of hte colorbar. The goal of doing this artifcats in the image.
Anything outside of the range of the colorbar is highlighted with the imdilate function in the mask which is then displayed as a replacement to the orignal image
When we click the buttons for "set range low" and "set range high", it should change the values of the image array so that anything outisde of the high and low limits is set to the actual high or low limit itself.
This seems to work, the problem is that the mask does not seem to reset. So after you click the buttons to "set the range low" in the image, if you go back to the slider and go outside of hte orignal range, there are still values that show up.
Im not sure what is going on, it seems to work ok in the matlab but not the application designer. Been stuck on this for an embarassing amount of time and could use a hand. thank you.
maxvalue = app.Sliderhigh.Value;
minvalue = app.Sliderlow.Value;
app.highEditField.Value = num2str(maxvalue);
app.lowEditField.Value= num2str(minvalue);
c = colorbar(app.UIAxes);
app.UIAxes.CLim = [minvalue maxvalue];
maska= app.a >maxvalue | app.a <minvalue ;
maskc = imdilate(maska,strel(‘disk’,25,0));
imagesc(maxvalue*maskc,’Parent’,app.UIAxes)In the attached app, there are 2 sliders for "set range low" and "set range high" which are used to change the scale of hte colorbar. The goal of doing this artifcats in the image.
Anything outside of the range of the colorbar is highlighted with the imdilate function in the mask which is then displayed as a replacement to the orignal image
When we click the buttons for "set range low" and "set range high", it should change the values of the image array so that anything outisde of the high and low limits is set to the actual high or low limit itself.
This seems to work, the problem is that the mask does not seem to reset. So after you click the buttons to "set the range low" in the image, if you go back to the slider and go outside of hte orignal range, there are still values that show up.
Im not sure what is going on, it seems to work ok in the matlab but not the application designer. Been stuck on this for an embarassing amount of time and could use a hand. thank you.
maxvalue = app.Sliderhigh.Value;
minvalue = app.Sliderlow.Value;
app.highEditField.Value = num2str(maxvalue);
app.lowEditField.Value= num2str(minvalue);
c = colorbar(app.UIAxes);
app.UIAxes.CLim = [minvalue maxvalue];
maska= app.a >maxvalue | app.a <minvalue ;
maskc = imdilate(maska,strel(‘disk’,25,0));
imagesc(maxvalue*maskc,’Parent’,app.UIAxes) In the attached app, there are 2 sliders for "set range low" and "set range high" which are used to change the scale of hte colorbar. The goal of doing this artifcats in the image.
Anything outside of the range of the colorbar is highlighted with the imdilate function in the mask which is then displayed as a replacement to the orignal image
When we click the buttons for "set range low" and "set range high", it should change the values of the image array so that anything outisde of the high and low limits is set to the actual high or low limit itself.
This seems to work, the problem is that the mask does not seem to reset. So after you click the buttons to "set the range low" in the image, if you go back to the slider and go outside of hte orignal range, there are still values that show up.
Im not sure what is going on, it seems to work ok in the matlab but not the application designer. Been stuck on this for an embarassing amount of time and could use a hand. thank you.
maxvalue = app.Sliderhigh.Value;
minvalue = app.Sliderlow.Value;
app.highEditField.Value = num2str(maxvalue);
app.lowEditField.Value= num2str(minvalue);
c = colorbar(app.UIAxes);
app.UIAxes.CLim = [minvalue maxvalue];
maska= app.a >maxvalue | app.a <minvalue ;
maskc = imdilate(maska,strel(‘disk’,25,0));
imagesc(maxvalue*maskc,’Parent’,app.UIAxes) application designer, mask MATLAB Answers — New Questions
How do I install and configure the network license manager for Polyspace products?
I have a concurrent license for my Polyspace products and I would like to setup the network license manager. How do I do so?I have a concurrent license for my Polyspace products and I would like to setup the network license manager. How do I do so? I have a concurrent license for my Polyspace products and I would like to setup the network license manager. How do I do so? MATLAB Answers — New Questions
how to solve illegal instruction while running the script
im using amd processor. while running the script from the editor it takes more and shows illegal instruction has been detected and matlab exist.im using amd processor. while running the script from the editor it takes more and shows illegal instruction has been detected and matlab exist. im using amd processor. while running the script from the editor it takes more and shows illegal instruction has been detected and matlab exist. script, instruction, environment variable MATLAB Answers — New Questions
AutomatedDrivingRadarSimulationExample does not work, due to helperAutoDrivingRadarSigProc>setupScenario
Hi, experts,
I am using R2024a and trying to run the example of AutomatedDrivingRadarSimulationExample by running the two commands below in the Command Window of matlab, but got error messages:
>> openExample(‘driving_radar/AutomatedDrivingRadarSimulationExample’)
>> AutomatedDrivingRadarSimulationExample
Please see the error messages below. Any idea why?
***************** Below is the output from "Command Window" of matlab ****************************
>> openExample(‘driving_radar/AutomatedDrivingRadarSimulationExample’)
>> AutomatedDrivingRadarSimulationExample
hpbw =
17.1800
drivingScenario requires Automated Driving Toolbox.
Error in helperAutoDrivingRadarSigProc>setupScenario (line 53)
scenario = drivingScenario;
Error in helperAutoDrivingRadarSigProc (line 12)
[scenario,egoCar,radarParams,tgts] = setupScenario(varargin{:});
Error in AutomatedDrivingRadarSimulationExample (line 138)
helperAutoDrivingRadarSigProc(‘Setup Scenario’,c,fc);
***************** Above is the output from "Command Window" of matlab ****************************Hi, experts,
I am using R2024a and trying to run the example of AutomatedDrivingRadarSimulationExample by running the two commands below in the Command Window of matlab, but got error messages:
>> openExample(‘driving_radar/AutomatedDrivingRadarSimulationExample’)
>> AutomatedDrivingRadarSimulationExample
Please see the error messages below. Any idea why?
***************** Below is the output from "Command Window" of matlab ****************************
>> openExample(‘driving_radar/AutomatedDrivingRadarSimulationExample’)
>> AutomatedDrivingRadarSimulationExample
hpbw =
17.1800
drivingScenario requires Automated Driving Toolbox.
Error in helperAutoDrivingRadarSigProc>setupScenario (line 53)
scenario = drivingScenario;
Error in helperAutoDrivingRadarSigProc (line 12)
[scenario,egoCar,radarParams,tgts] = setupScenario(varargin{:});
Error in AutomatedDrivingRadarSimulationExample (line 138)
helperAutoDrivingRadarSigProc(‘Setup Scenario’,c,fc);
***************** Above is the output from "Command Window" of matlab **************************** Hi, experts,
I am using R2024a and trying to run the example of AutomatedDrivingRadarSimulationExample by running the two commands below in the Command Window of matlab, but got error messages:
>> openExample(‘driving_radar/AutomatedDrivingRadarSimulationExample’)
>> AutomatedDrivingRadarSimulationExample
Please see the error messages below. Any idea why?
***************** Below is the output from "Command Window" of matlab ****************************
>> openExample(‘driving_radar/AutomatedDrivingRadarSimulationExample’)
>> AutomatedDrivingRadarSimulationExample
hpbw =
17.1800
drivingScenario requires Automated Driving Toolbox.
Error in helperAutoDrivingRadarSigProc>setupScenario (line 53)
scenario = drivingScenario;
Error in helperAutoDrivingRadarSigProc (line 12)
[scenario,egoCar,radarParams,tgts] = setupScenario(varargin{:});
Error in AutomatedDrivingRadarSimulationExample (line 138)
helperAutoDrivingRadarSigProc(‘Setup Scenario’,c,fc);
***************** Above is the output from "Command Window" of matlab **************************** radar, autodriving MATLAB Answers — New Questions
How to locked/unlocked cells in an Excel file?
Dear,
how can I lock/unlock cells in Excell file?
For example: file = ‘Fruits.xlsx’, Sheet = ‘Apple’, Range = ‘B4:B10’.
How is possible to lock the cells in range ‘B4:B10’ in my file and my sheet? The file and the sheet are unprotected.
Thank you very much? Jurij RiciDear,
how can I lock/unlock cells in Excell file?
For example: file = ‘Fruits.xlsx’, Sheet = ‘Apple’, Range = ‘B4:B10’.
How is possible to lock the cells in range ‘B4:B10’ in my file and my sheet? The file and the sheet are unprotected.
Thank you very much? Jurij Rici Dear,
how can I lock/unlock cells in Excell file?
For example: file = ‘Fruits.xlsx’, Sheet = ‘Apple’, Range = ‘B4:B10’.
How is possible to lock the cells in range ‘B4:B10’ in my file and my sheet? The file and the sheet are unprotected.
Thank you very much? Jurij Rici excel, locked cells MATLAB Answers — New Questions
MEAN OF A VARIABLE WITH RESPECT TO OTHER VARIABLES
I would like to find mean of the variable a25 other variable a6a7 and by year .
input int(year a6a7) long a25
2017 121 12000
2017 121 30000
2017 121 13000
2017 121 14000
2017 121 15000
2017 121 15000
2017 121 15000
2017 121 20000
2017 121 15000
2017 121 8000
2017 121 10000
2017 121 14000
2017 121 35000
2017 121 6000
2017 121 2000
2017 121 10000
2017 17 15000
2017 17 15000
2017 17 12000
2017 17 15000
2017 17 15000
2017 17 8000
2017 17 7000
2017 17 5000
2017 121 10000
2017 121 10000
2017 121 6000
2017 121 8000
2017 121 8000
2017 121 12000
2017 121 10000
2017 121 10000
2017 121 16000
2017 121 8000
2017 121 12000
2017 121 15000
2017 121 15000
2017 121 15000
2017 121 8000
2017 121 10000
2017 121 10000
2017 121 8000
2017 121 6000
2017 121 6000
2017 121 6000
2017 121 10000
2017 121 10000
2017 121 10000
2017 121 7000
2017 121 8000
2017 121 10000
2017 121 10000
2017 121 15000
2017 121 5000
2017 121 10000
2017 121 10000
2017 17 25000
2017 17 8000
2017 17 8000
2017 17 10000
2017 17 7000
2017 17 6000
2017 17 3500
2017 17 8000
2017 17 20000
2017 17 16000
2017 17 16000
2017 17 14000
2017 17 25000
2017 17 15000
2017 17 16000
2017 17 16000
2017 121 12000
2017 121 15000
2017 121 12000
2017 121 12000
2017 121 13000
2017 121 12000
2017 121 14000
2017 121 8000
2017 120 5000
2017 120 5000
2017 120 4000
2017 120 5000
2017 120 3000
2017 120 4000
2017 120 4000
2017 120 4000
2017 119 6000
2017 119 6000
2017 119 4000
2017 119 5000
2017 119 5000
2017 119 7000
2017 119 7000
2017 119 6000
2017 16 20000
2017 16 15000
2017 16 20000
2017 16 15000
end
[/CODE]I would like to find mean of the variable a25 other variable a6a7 and by year .
input int(year a6a7) long a25
2017 121 12000
2017 121 30000
2017 121 13000
2017 121 14000
2017 121 15000
2017 121 15000
2017 121 15000
2017 121 20000
2017 121 15000
2017 121 8000
2017 121 10000
2017 121 14000
2017 121 35000
2017 121 6000
2017 121 2000
2017 121 10000
2017 17 15000
2017 17 15000
2017 17 12000
2017 17 15000
2017 17 15000
2017 17 8000
2017 17 7000
2017 17 5000
2017 121 10000
2017 121 10000
2017 121 6000
2017 121 8000
2017 121 8000
2017 121 12000
2017 121 10000
2017 121 10000
2017 121 16000
2017 121 8000
2017 121 12000
2017 121 15000
2017 121 15000
2017 121 15000
2017 121 8000
2017 121 10000
2017 121 10000
2017 121 8000
2017 121 6000
2017 121 6000
2017 121 6000
2017 121 10000
2017 121 10000
2017 121 10000
2017 121 7000
2017 121 8000
2017 121 10000
2017 121 10000
2017 121 15000
2017 121 5000
2017 121 10000
2017 121 10000
2017 17 25000
2017 17 8000
2017 17 8000
2017 17 10000
2017 17 7000
2017 17 6000
2017 17 3500
2017 17 8000
2017 17 20000
2017 17 16000
2017 17 16000
2017 17 14000
2017 17 25000
2017 17 15000
2017 17 16000
2017 17 16000
2017 121 12000
2017 121 15000
2017 121 12000
2017 121 12000
2017 121 13000
2017 121 12000
2017 121 14000
2017 121 8000
2017 120 5000
2017 120 5000
2017 120 4000
2017 120 5000
2017 120 3000
2017 120 4000
2017 120 4000
2017 120 4000
2017 119 6000
2017 119 6000
2017 119 4000
2017 119 5000
2017 119 5000
2017 119 7000
2017 119 7000
2017 119 6000
2017 16 20000
2017 16 15000
2017 16 20000
2017 16 15000
end
[/CODE] I would like to find mean of the variable a25 other variable a6a7 and by year .
input int(year a6a7) long a25
2017 121 12000
2017 121 30000
2017 121 13000
2017 121 14000
2017 121 15000
2017 121 15000
2017 121 15000
2017 121 20000
2017 121 15000
2017 121 8000
2017 121 10000
2017 121 14000
2017 121 35000
2017 121 6000
2017 121 2000
2017 121 10000
2017 17 15000
2017 17 15000
2017 17 12000
2017 17 15000
2017 17 15000
2017 17 8000
2017 17 7000
2017 17 5000
2017 121 10000
2017 121 10000
2017 121 6000
2017 121 8000
2017 121 8000
2017 121 12000
2017 121 10000
2017 121 10000
2017 121 16000
2017 121 8000
2017 121 12000
2017 121 15000
2017 121 15000
2017 121 15000
2017 121 8000
2017 121 10000
2017 121 10000
2017 121 8000
2017 121 6000
2017 121 6000
2017 121 6000
2017 121 10000
2017 121 10000
2017 121 10000
2017 121 7000
2017 121 8000
2017 121 10000
2017 121 10000
2017 121 15000
2017 121 5000
2017 121 10000
2017 121 10000
2017 17 25000
2017 17 8000
2017 17 8000
2017 17 10000
2017 17 7000
2017 17 6000
2017 17 3500
2017 17 8000
2017 17 20000
2017 17 16000
2017 17 16000
2017 17 14000
2017 17 25000
2017 17 15000
2017 17 16000
2017 17 16000
2017 121 12000
2017 121 15000
2017 121 12000
2017 121 12000
2017 121 13000
2017 121 12000
2017 121 14000
2017 121 8000
2017 120 5000
2017 120 5000
2017 120 4000
2017 120 5000
2017 120 3000
2017 120 4000
2017 120 4000
2017 120 4000
2017 119 6000
2017 119 6000
2017 119 4000
2017 119 5000
2017 119 5000
2017 119 7000
2017 119 7000
2017 119 6000
2017 16 20000
2017 16 15000
2017 16 20000
2017 16 15000
end
[/CODE] mean, big data MATLAB Answers — New Questions
Solar PV System with MPPT Using Boost Converter
In the mentioned Official Simulink Model, I do not know whether the model is tested using Speedgoat through rapid control prototyping or not. Can anyone please let me know.In the mentioned Official Simulink Model, I do not know whether the model is tested using Speedgoat through rapid control prototyping or not. Can anyone please let me know. In the mentioned Official Simulink Model, I do not know whether the model is tested using Speedgoat through rapid control prototyping or not. Can anyone please let me know. speedgoat, transferred MATLAB Answers — New Questions
Plot – Remove axis ticks but keep grid lines
Hi,
I am producing a graph to view open source polysomnography data. I have several arrays in one plot window with an offset between them which is fairly standard. I wish to remove the y tick numbers as they aren’t required and get in the way of some additional lables. I would like to also include some x and y axis gridlines.
I have implemented the following code below, however the ‘set(gca,’ytick’,[])’ command makes the y gridlines not plot. How can I remove the ytick numbers on the y axis but keep the y gridlines?
Thanks in advance,
Christopher!
% Create a new empty figure
figure
% Remove y axis numbering
set(gca,’ytick’,[])
% Set major Grid lines
ax.GridLineStyle = ‘–‘;
ax.GridColor = ‘b’;
ax.GridAlpha = 1;
grid on;
% Set minor Grid lines
ax.MinorGridLineStyle = ‘-‘;
ax.MinorGridColor = ‘b’;
ax.MinorGridAlpha = 0.5;
grid minor;Hi,
I am producing a graph to view open source polysomnography data. I have several arrays in one plot window with an offset between them which is fairly standard. I wish to remove the y tick numbers as they aren’t required and get in the way of some additional lables. I would like to also include some x and y axis gridlines.
I have implemented the following code below, however the ‘set(gca,’ytick’,[])’ command makes the y gridlines not plot. How can I remove the ytick numbers on the y axis but keep the y gridlines?
Thanks in advance,
Christopher!
% Create a new empty figure
figure
% Remove y axis numbering
set(gca,’ytick’,[])
% Set major Grid lines
ax.GridLineStyle = ‘–‘;
ax.GridColor = ‘b’;
ax.GridAlpha = 1;
grid on;
% Set minor Grid lines
ax.MinorGridLineStyle = ‘-‘;
ax.MinorGridColor = ‘b’;
ax.MinorGridAlpha = 0.5;
grid minor; Hi,
I am producing a graph to view open source polysomnography data. I have several arrays in one plot window with an offset between them which is fairly standard. I wish to remove the y tick numbers as they aren’t required and get in the way of some additional lables. I would like to also include some x and y axis gridlines.
I have implemented the following code below, however the ‘set(gca,’ytick’,[])’ command makes the y gridlines not plot. How can I remove the ytick numbers on the y axis but keep the y gridlines?
Thanks in advance,
Christopher!
% Create a new empty figure
figure
% Remove y axis numbering
set(gca,’ytick’,[])
% Set major Grid lines
ax.GridLineStyle = ‘–‘;
ax.GridColor = ‘b’;
ax.GridAlpha = 1;
grid on;
% Set minor Grid lines
ax.MinorGridLineStyle = ‘-‘;
ax.MinorGridColor = ‘b’;
ax.MinorGridAlpha = 0.5;
grid minor; plot, tick, gridline MATLAB Answers — New Questions