Tag Archives: matlab
How do I make a desktop launcher for MATLAB in Linux?
I don’t want to have to open a terminal window every time I want to launch MATLAB on Linux. I tried to make a Gnome launcher, but it does not seem to work. The command I gave was:
/usr/local/bin/matlab &
I see the process running, but now windows appear. What am I doing wrong?I don’t want to have to open a terminal window every time I want to launch MATLAB on Linux. I tried to make a Gnome launcher, but it does not seem to work. The command I gave was:
/usr/local/bin/matlab &
I see the process running, but now windows appear. What am I doing wrong? I don’t want to have to open a terminal window every time I want to launch MATLAB on Linux. I tried to make a Gnome launcher, but it does not seem to work. The command I gave was:
/usr/local/bin/matlab &
I see the process running, but now windows appear. What am I doing wrong? startup, linux, launcher, command MATLAB Answers — New Questions
Issue with plotting order
Hello,
I have been trying to plot a shaded area (right y-axis) behind two lines (left y-axis), as shown in the code below. However, the shaded area always appears last, covering up the two lines. I’ve done this kind of graph before but have never had this issue. Best I can tell, it is because the right y-axis is plotted last. Is there a way to make the right y-axis plotted first? I can’t simply switch which data is on the axis, unfortunately: they need to be in this order. Thanks for any help!
clear; clc; close all;
Data = xlsread("FigureOfMeritResults.xlsx");
% Extract data
Date = Data(469:1908,1);
FoM = Data(469:1908,3);
GHI = Data(469:1908,4);
% Calculate the running average over 5 data points
FoM_avg = movmean(FoM, 5);
GHI_avg = movmean(GHI, 5);
dFoM = zeros(length(FoM),1) + mean(FoM);
ticks = {’12:00AM’,’4:00AM’,’8:00AM’,’12:00PM’,’4:00PM’,’8:00PM’,’12:00AM’};
fz = 15;
%%
fig = figure;
set(gcf,’Color’,’w’,’Units’,’inches’)
set(gcf,’Position’,[1,1,5,6])
GHI_color = [0.8 0.8 1];
yyaxis left;
p1 = scatter(Date, FoM, ‘Marker’, ‘.’, ‘SizeData’, 15, ‘MarkerFaceColor’, "#0072BD");
hold on;
p2 = scatter(Date, dFoM, ‘Marker’, ‘_’, ‘SizeData’, 15, ‘MarkerFaceColor’, ‘black’);
hold on;
ax = gca;
ax.YColor = ‘k’;
yyaxis right;
xData = [Date; flipud(Date)];
yData = [zeros(size(GHI)); flipud(GHI)];
fillHandle = fill(xData, yData, GHI_color,’EdgeColor’,’none’);
hold on;
ax = gca;
ax.YColor = ‘k’;
xlabel(‘Time of Day (hrs)’, ‘FontSize’, fz);
numTicks = length(ticks);
tickPositions = linspace(min(Date), max(Date), numTicks);
xticks(tickPositions);
xticklabels(ticks);
set(gca, ‘FontSize’, fz);
ax = gca;
box on;
set(ax,’BoxStyle’,’full’,’LineWidth’,2,’XGrid’,’off’,’XMinorTick’,’off’,’YGrid’,’off’,…
‘YMinorTick’,’on’);Hello,
I have been trying to plot a shaded area (right y-axis) behind two lines (left y-axis), as shown in the code below. However, the shaded area always appears last, covering up the two lines. I’ve done this kind of graph before but have never had this issue. Best I can tell, it is because the right y-axis is plotted last. Is there a way to make the right y-axis plotted first? I can’t simply switch which data is on the axis, unfortunately: they need to be in this order. Thanks for any help!
clear; clc; close all;
Data = xlsread("FigureOfMeritResults.xlsx");
% Extract data
Date = Data(469:1908,1);
FoM = Data(469:1908,3);
GHI = Data(469:1908,4);
% Calculate the running average over 5 data points
FoM_avg = movmean(FoM, 5);
GHI_avg = movmean(GHI, 5);
dFoM = zeros(length(FoM),1) + mean(FoM);
ticks = {’12:00AM’,’4:00AM’,’8:00AM’,’12:00PM’,’4:00PM’,’8:00PM’,’12:00AM’};
fz = 15;
%%
fig = figure;
set(gcf,’Color’,’w’,’Units’,’inches’)
set(gcf,’Position’,[1,1,5,6])
GHI_color = [0.8 0.8 1];
yyaxis left;
p1 = scatter(Date, FoM, ‘Marker’, ‘.’, ‘SizeData’, 15, ‘MarkerFaceColor’, "#0072BD");
hold on;
p2 = scatter(Date, dFoM, ‘Marker’, ‘_’, ‘SizeData’, 15, ‘MarkerFaceColor’, ‘black’);
hold on;
ax = gca;
ax.YColor = ‘k’;
yyaxis right;
xData = [Date; flipud(Date)];
yData = [zeros(size(GHI)); flipud(GHI)];
fillHandle = fill(xData, yData, GHI_color,’EdgeColor’,’none’);
hold on;
ax = gca;
ax.YColor = ‘k’;
xlabel(‘Time of Day (hrs)’, ‘FontSize’, fz);
numTicks = length(ticks);
tickPositions = linspace(min(Date), max(Date), numTicks);
xticks(tickPositions);
xticklabels(ticks);
set(gca, ‘FontSize’, fz);
ax = gca;
box on;
set(ax,’BoxStyle’,’full’,’LineWidth’,2,’XGrid’,’off’,’XMinorTick’,’off’,’YGrid’,’off’,…
‘YMinorTick’,’on’); Hello,
I have been trying to plot a shaded area (right y-axis) behind two lines (left y-axis), as shown in the code below. However, the shaded area always appears last, covering up the two lines. I’ve done this kind of graph before but have never had this issue. Best I can tell, it is because the right y-axis is plotted last. Is there a way to make the right y-axis plotted first? I can’t simply switch which data is on the axis, unfortunately: they need to be in this order. Thanks for any help!
clear; clc; close all;
Data = xlsread("FigureOfMeritResults.xlsx");
% Extract data
Date = Data(469:1908,1);
FoM = Data(469:1908,3);
GHI = Data(469:1908,4);
% Calculate the running average over 5 data points
FoM_avg = movmean(FoM, 5);
GHI_avg = movmean(GHI, 5);
dFoM = zeros(length(FoM),1) + mean(FoM);
ticks = {’12:00AM’,’4:00AM’,’8:00AM’,’12:00PM’,’4:00PM’,’8:00PM’,’12:00AM’};
fz = 15;
%%
fig = figure;
set(gcf,’Color’,’w’,’Units’,’inches’)
set(gcf,’Position’,[1,1,5,6])
GHI_color = [0.8 0.8 1];
yyaxis left;
p1 = scatter(Date, FoM, ‘Marker’, ‘.’, ‘SizeData’, 15, ‘MarkerFaceColor’, "#0072BD");
hold on;
p2 = scatter(Date, dFoM, ‘Marker’, ‘_’, ‘SizeData’, 15, ‘MarkerFaceColor’, ‘black’);
hold on;
ax = gca;
ax.YColor = ‘k’;
yyaxis right;
xData = [Date; flipud(Date)];
yData = [zeros(size(GHI)); flipud(GHI)];
fillHandle = fill(xData, yData, GHI_color,’EdgeColor’,’none’);
hold on;
ax = gca;
ax.YColor = ‘k’;
xlabel(‘Time of Day (hrs)’, ‘FontSize’, fz);
numTicks = length(ticks);
tickPositions = linspace(min(Date), max(Date), numTicks);
xticks(tickPositions);
xticklabels(ticks);
set(gca, ‘FontSize’, fz);
ax = gca;
box on;
set(ax,’BoxStyle’,’full’,’LineWidth’,2,’XGrid’,’off’,’XMinorTick’,’off’,’YGrid’,’off’,…
‘YMinorTick’,’on’); plot, area MATLAB Answers — New Questions
How to read the properties information of kml data
I got geographical information using ‘readgeotable’,
but I want to bring properties information of actual kml data.
In more detail, I would like to bring each field within the kml data and the property information corresponding to the field.
Is there any way?I got geographical information using ‘readgeotable’,
but I want to bring properties information of actual kml data.
In more detail, I would like to bring each field within the kml data and the property information corresponding to the field.
Is there any way? I got geographical information using ‘readgeotable’,
but I want to bring properties information of actual kml data.
In more detail, I would like to bring each field within the kml data and the property information corresponding to the field.
Is there any way? kml, readtable MATLAB Answers — New Questions
Periodic result using ode45 while simulating a parachute decent with 6DOF dynamics
So I’ve been trying to simulate a parachute descent (very basic model, almost a mass body with a coefficient of drag), from a height. While simulating only in the axial direction(z axis), the results coincide with kinematics equations. However, when I give a non-zero initial condition, the outputs go crazy (definitely not correct) with periodic solutions to related terms. I seem to have checked my equations, they seem to be right. Is there anything with ‘odeset’ I can work this out around.
Zero non-axial initial condition:
x0 = [0; 0; -100; 0; 0; 1; 0; 0; 0; 0; 0; 0];
Non-zero IC:
x0 = [0; 0; -100; 0; 1; 1; 0; 0; 0; 0; 0; 0];
0
this is the code i’ve used for these plots. Please feel free to ask any clarifications
%% 6DOF fucntion definition
function [dxdt, aoa_series] = six_DOF_dynamics(t,x)
M_para = 5; %mass of the parachute in Kgs
g = 9.81; %gravitational acceleration in m/s^2
I_x = 1; I_y = 1; I_z = 3; %Inertia matrix diagonal principal of the parachute in kg-m^2
CD_para = 0.9; %coefficient of drag of parachute
CL_para = 0; %coefficient of lift of parachute
rho = 1; %density of the atmosphere in Kg/m^3
x_com = 0; y_com = 0; z_com = -5; %position of COM of the paarchute from the integrated system’s COM(body axis origin) in m
A = 10; %parachute area in m^2
%state variables defining
x_pos = x(1); y_pos = x(2); z_pos = x(3); %postion variables
u = x(4); v = x(5); w = x(6); %velocity variables
phi = x(7); theta = x(8); psi = x(9); %attitude/euler angles variables
p = x(10); q = x(11); r = x(12); %euler angular rate variables
%rate of change of postion -> velocity
dx_pos = u;
dy_pos = v;
dz_pos = w;
%Gravity moment of the parachute along x,y and z components
GravityMoment_para_x = M_para*g*cos(theta)*(y_com*cos(phi) – z_com*sin(phi));
GravityMoment_para_y = M_para*g*(z_com*sin(theta) – x_com*cos(theta)*cos(phi));
GravityMoment_para_z = M_para*g*(x_com*cos(theta)*sin(phi) + y_com*sin(theta));
V_total = sqrt(u^2 + v^2 + w^2); %net speed
persistent angle_of_attack %defining this variable to take it as a output outside ode45
alpha = acos(w/V_total); %angle of attack calculated in radians
angle_of_attack = [angle_of_attack; alpha]; %concatinating current iterated angle of attack in global variable
%Componetize CD and CL into tangential and normal force coefficients
CT = CD_para*cos(alpha) – CL_para*sin(alpha);
CN = CL_para*cos(alpha) + CD_para*sin(alpha);
% Aerodynamic force along x,y,z axes F = 0.5*rho*v^2*A
if (u == 0 & v == 0)
Aerodynamic_force_x = 0;
Aerodynamic_force_y = 0;
Aerodynamic_force_z = -0.5*rho*CT*V_total*V_total*A;
else
Aerodynamic_force_x = -0.5*rho*CN*V_total*V_total*A*(u/(u^2 + v^2)^0.5);
Aerodynamic_force_y = -0.5*rho*CN*V_total*V_total*A*(v/(u^2 + v^2)^0.5);
Aerodynamic_force_z = -0.5*rho*CT*V_total*V_total*A;
end
%Moment caused by aerodynamic force along x,y,x
Aerodynamic_moment_x = y_com*Aerodynamic_force_z – z_com*Aerodynamic_force_y;
Aerodynamic_moment_y = z_com*Aerodynamic_force_x – x_com*Aerodynamic_force_z;
Aerodynamic_moment_z = x_com*Aerodynamic_force_y – y_com*Aerodynamic_force_x;
%rate change of velocity definition
du = v*r – w*q + g*sin(theta) + Aerodynamic_force_x/M_para;
dv = -u*r + w*p + g*cos(theta)*sin(phi) + Aerodynamic_force_y/M_para;
dw = u*q – v*p + g*cos(theta)*cos(phi) + Aerodynamic_force_z/M_para;
%rate change of euler angles definition
dphi = p + (r*cos(phi) + q*sin(phi))*tan(theta);
dtheta = q*cos(phi) – r*sin(phi);
dpsi = (cos(theta)^-1)*(r*cos(phi) + q*sin(phi));
%rate change of angular rates definition
dp = (1/I_x)*(Aerodynamic_moment_x + GravityMoment_para_x);
dq = (1/I_y)*(Aerodynamic_moment_y + GravityMoment_para_y);
dr = (1/I_z)*(Aerodynamic_moment_z + GravityMoment_para_z);
dxdt = [dx_pos; dy_pos; dz_pos; du; dv; dw; dphi; dtheta; dpsi; dp; dq; dr];
%block to output angle of attack
if nargout>1
aoa_series = angle_of_attack;
end
end
tspan = [0 3];
x0 = [0; 0; -100; 0; 1; 1; 0; 0; 0; 0; 0; 0];
[t, x] = ode45(@six_DOF_dynamics, tspan, x0);
[~, aoa_series] = six_DOF_dynamics(t,x);
%adding alpha as a part of x
% Plot results
figure;
subplot(4,1,1);
plot(t, x(:,1:3));
title(‘Position’);
legend(‘x’, ‘y’, ‘z’);
subplot(4,1,2);
plot(t, x(:,4:6));
title(‘Velocity’);
legend(‘u’, ‘v’, ‘w’);
subplot(4,1,3);
plot(t, x(:,7:9));
title(‘Euler Angles’);
legend(‘phi’, ‘theta’, ‘psi’);
subplot(4,1,4);
plot(t, x(:,10:12));
title(‘Euler Rates’);
legend(‘p’, ‘q’, ‘r’);So I’ve been trying to simulate a parachute descent (very basic model, almost a mass body with a coefficient of drag), from a height. While simulating only in the axial direction(z axis), the results coincide with kinematics equations. However, when I give a non-zero initial condition, the outputs go crazy (definitely not correct) with periodic solutions to related terms. I seem to have checked my equations, they seem to be right. Is there anything with ‘odeset’ I can work this out around.
Zero non-axial initial condition:
x0 = [0; 0; -100; 0; 0; 1; 0; 0; 0; 0; 0; 0];
Non-zero IC:
x0 = [0; 0; -100; 0; 1; 1; 0; 0; 0; 0; 0; 0];
0
this is the code i’ve used for these plots. Please feel free to ask any clarifications
%% 6DOF fucntion definition
function [dxdt, aoa_series] = six_DOF_dynamics(t,x)
M_para = 5; %mass of the parachute in Kgs
g = 9.81; %gravitational acceleration in m/s^2
I_x = 1; I_y = 1; I_z = 3; %Inertia matrix diagonal principal of the parachute in kg-m^2
CD_para = 0.9; %coefficient of drag of parachute
CL_para = 0; %coefficient of lift of parachute
rho = 1; %density of the atmosphere in Kg/m^3
x_com = 0; y_com = 0; z_com = -5; %position of COM of the paarchute from the integrated system’s COM(body axis origin) in m
A = 10; %parachute area in m^2
%state variables defining
x_pos = x(1); y_pos = x(2); z_pos = x(3); %postion variables
u = x(4); v = x(5); w = x(6); %velocity variables
phi = x(7); theta = x(8); psi = x(9); %attitude/euler angles variables
p = x(10); q = x(11); r = x(12); %euler angular rate variables
%rate of change of postion -> velocity
dx_pos = u;
dy_pos = v;
dz_pos = w;
%Gravity moment of the parachute along x,y and z components
GravityMoment_para_x = M_para*g*cos(theta)*(y_com*cos(phi) – z_com*sin(phi));
GravityMoment_para_y = M_para*g*(z_com*sin(theta) – x_com*cos(theta)*cos(phi));
GravityMoment_para_z = M_para*g*(x_com*cos(theta)*sin(phi) + y_com*sin(theta));
V_total = sqrt(u^2 + v^2 + w^2); %net speed
persistent angle_of_attack %defining this variable to take it as a output outside ode45
alpha = acos(w/V_total); %angle of attack calculated in radians
angle_of_attack = [angle_of_attack; alpha]; %concatinating current iterated angle of attack in global variable
%Componetize CD and CL into tangential and normal force coefficients
CT = CD_para*cos(alpha) – CL_para*sin(alpha);
CN = CL_para*cos(alpha) + CD_para*sin(alpha);
% Aerodynamic force along x,y,z axes F = 0.5*rho*v^2*A
if (u == 0 & v == 0)
Aerodynamic_force_x = 0;
Aerodynamic_force_y = 0;
Aerodynamic_force_z = -0.5*rho*CT*V_total*V_total*A;
else
Aerodynamic_force_x = -0.5*rho*CN*V_total*V_total*A*(u/(u^2 + v^2)^0.5);
Aerodynamic_force_y = -0.5*rho*CN*V_total*V_total*A*(v/(u^2 + v^2)^0.5);
Aerodynamic_force_z = -0.5*rho*CT*V_total*V_total*A;
end
%Moment caused by aerodynamic force along x,y,x
Aerodynamic_moment_x = y_com*Aerodynamic_force_z – z_com*Aerodynamic_force_y;
Aerodynamic_moment_y = z_com*Aerodynamic_force_x – x_com*Aerodynamic_force_z;
Aerodynamic_moment_z = x_com*Aerodynamic_force_y – y_com*Aerodynamic_force_x;
%rate change of velocity definition
du = v*r – w*q + g*sin(theta) + Aerodynamic_force_x/M_para;
dv = -u*r + w*p + g*cos(theta)*sin(phi) + Aerodynamic_force_y/M_para;
dw = u*q – v*p + g*cos(theta)*cos(phi) + Aerodynamic_force_z/M_para;
%rate change of euler angles definition
dphi = p + (r*cos(phi) + q*sin(phi))*tan(theta);
dtheta = q*cos(phi) – r*sin(phi);
dpsi = (cos(theta)^-1)*(r*cos(phi) + q*sin(phi));
%rate change of angular rates definition
dp = (1/I_x)*(Aerodynamic_moment_x + GravityMoment_para_x);
dq = (1/I_y)*(Aerodynamic_moment_y + GravityMoment_para_y);
dr = (1/I_z)*(Aerodynamic_moment_z + GravityMoment_para_z);
dxdt = [dx_pos; dy_pos; dz_pos; du; dv; dw; dphi; dtheta; dpsi; dp; dq; dr];
%block to output angle of attack
if nargout>1
aoa_series = angle_of_attack;
end
end
tspan = [0 3];
x0 = [0; 0; -100; 0; 1; 1; 0; 0; 0; 0; 0; 0];
[t, x] = ode45(@six_DOF_dynamics, tspan, x0);
[~, aoa_series] = six_DOF_dynamics(t,x);
%adding alpha as a part of x
% Plot results
figure;
subplot(4,1,1);
plot(t, x(:,1:3));
title(‘Position’);
legend(‘x’, ‘y’, ‘z’);
subplot(4,1,2);
plot(t, x(:,4:6));
title(‘Velocity’);
legend(‘u’, ‘v’, ‘w’);
subplot(4,1,3);
plot(t, x(:,7:9));
title(‘Euler Angles’);
legend(‘phi’, ‘theta’, ‘psi’);
subplot(4,1,4);
plot(t, x(:,10:12));
title(‘Euler Rates’);
legend(‘p’, ‘q’, ‘r’); So I’ve been trying to simulate a parachute descent (very basic model, almost a mass body with a coefficient of drag), from a height. While simulating only in the axial direction(z axis), the results coincide with kinematics equations. However, when I give a non-zero initial condition, the outputs go crazy (definitely not correct) with periodic solutions to related terms. I seem to have checked my equations, they seem to be right. Is there anything with ‘odeset’ I can work this out around.
Zero non-axial initial condition:
x0 = [0; 0; -100; 0; 0; 1; 0; 0; 0; 0; 0; 0];
Non-zero IC:
x0 = [0; 0; -100; 0; 1; 1; 0; 0; 0; 0; 0; 0];
0
this is the code i’ve used for these plots. Please feel free to ask any clarifications
%% 6DOF fucntion definition
function [dxdt, aoa_series] = six_DOF_dynamics(t,x)
M_para = 5; %mass of the parachute in Kgs
g = 9.81; %gravitational acceleration in m/s^2
I_x = 1; I_y = 1; I_z = 3; %Inertia matrix diagonal principal of the parachute in kg-m^2
CD_para = 0.9; %coefficient of drag of parachute
CL_para = 0; %coefficient of lift of parachute
rho = 1; %density of the atmosphere in Kg/m^3
x_com = 0; y_com = 0; z_com = -5; %position of COM of the paarchute from the integrated system’s COM(body axis origin) in m
A = 10; %parachute area in m^2
%state variables defining
x_pos = x(1); y_pos = x(2); z_pos = x(3); %postion variables
u = x(4); v = x(5); w = x(6); %velocity variables
phi = x(7); theta = x(8); psi = x(9); %attitude/euler angles variables
p = x(10); q = x(11); r = x(12); %euler angular rate variables
%rate of change of postion -> velocity
dx_pos = u;
dy_pos = v;
dz_pos = w;
%Gravity moment of the parachute along x,y and z components
GravityMoment_para_x = M_para*g*cos(theta)*(y_com*cos(phi) – z_com*sin(phi));
GravityMoment_para_y = M_para*g*(z_com*sin(theta) – x_com*cos(theta)*cos(phi));
GravityMoment_para_z = M_para*g*(x_com*cos(theta)*sin(phi) + y_com*sin(theta));
V_total = sqrt(u^2 + v^2 + w^2); %net speed
persistent angle_of_attack %defining this variable to take it as a output outside ode45
alpha = acos(w/V_total); %angle of attack calculated in radians
angle_of_attack = [angle_of_attack; alpha]; %concatinating current iterated angle of attack in global variable
%Componetize CD and CL into tangential and normal force coefficients
CT = CD_para*cos(alpha) – CL_para*sin(alpha);
CN = CL_para*cos(alpha) + CD_para*sin(alpha);
% Aerodynamic force along x,y,z axes F = 0.5*rho*v^2*A
if (u == 0 & v == 0)
Aerodynamic_force_x = 0;
Aerodynamic_force_y = 0;
Aerodynamic_force_z = -0.5*rho*CT*V_total*V_total*A;
else
Aerodynamic_force_x = -0.5*rho*CN*V_total*V_total*A*(u/(u^2 + v^2)^0.5);
Aerodynamic_force_y = -0.5*rho*CN*V_total*V_total*A*(v/(u^2 + v^2)^0.5);
Aerodynamic_force_z = -0.5*rho*CT*V_total*V_total*A;
end
%Moment caused by aerodynamic force along x,y,x
Aerodynamic_moment_x = y_com*Aerodynamic_force_z – z_com*Aerodynamic_force_y;
Aerodynamic_moment_y = z_com*Aerodynamic_force_x – x_com*Aerodynamic_force_z;
Aerodynamic_moment_z = x_com*Aerodynamic_force_y – y_com*Aerodynamic_force_x;
%rate change of velocity definition
du = v*r – w*q + g*sin(theta) + Aerodynamic_force_x/M_para;
dv = -u*r + w*p + g*cos(theta)*sin(phi) + Aerodynamic_force_y/M_para;
dw = u*q – v*p + g*cos(theta)*cos(phi) + Aerodynamic_force_z/M_para;
%rate change of euler angles definition
dphi = p + (r*cos(phi) + q*sin(phi))*tan(theta);
dtheta = q*cos(phi) – r*sin(phi);
dpsi = (cos(theta)^-1)*(r*cos(phi) + q*sin(phi));
%rate change of angular rates definition
dp = (1/I_x)*(Aerodynamic_moment_x + GravityMoment_para_x);
dq = (1/I_y)*(Aerodynamic_moment_y + GravityMoment_para_y);
dr = (1/I_z)*(Aerodynamic_moment_z + GravityMoment_para_z);
dxdt = [dx_pos; dy_pos; dz_pos; du; dv; dw; dphi; dtheta; dpsi; dp; dq; dr];
%block to output angle of attack
if nargout>1
aoa_series = angle_of_attack;
end
end
tspan = [0 3];
x0 = [0; 0; -100; 0; 1; 1; 0; 0; 0; 0; 0; 0];
[t, x] = ode45(@six_DOF_dynamics, tspan, x0);
[~, aoa_series] = six_DOF_dynamics(t,x);
%adding alpha as a part of x
% Plot results
figure;
subplot(4,1,1);
plot(t, x(:,1:3));
title(‘Position’);
legend(‘x’, ‘y’, ‘z’);
subplot(4,1,2);
plot(t, x(:,4:6));
title(‘Velocity’);
legend(‘u’, ‘v’, ‘w’);
subplot(4,1,3);
plot(t, x(:,7:9));
title(‘Euler Angles’);
legend(‘phi’, ‘theta’, ‘psi’);
subplot(4,1,4);
plot(t, x(:,10:12));
title(‘Euler Rates’);
legend(‘p’, ‘q’, ‘r’); 6dof, parachute, periodic MATLAB Answers — New Questions
Optimizing Hyperparameters for trainnet fucntion
Hi there I have built my own TCN model in matlab to predict a contunious output and am trying to figure out the best way to optimize the hyperparmeters: Filter Size, Number of Filters, Number of Blocks, and Drop out Factor. I am attempting to use the bayespot function, but am not sure what to use as my function handel and if this is the best method for this kind of network. Should I be using the experiment manger to do this instead (https://www.mathworks.com/help/deeplearning/ug/tune-experiment-hyperparameters-using-bayesian-optimization.html) Does anyone have an suggestions for my code or if there is another way to perform hyperparmeter optimization for this type of network achetecture? Thanks so much.
%Network
numFilters = 64;
filterSize = 5;
droupoutFactor = 0.005;
numBlocks = 5;
net = dlnetwork;
layer = sequenceInputLayer(numFeatures,Normalization="rescale-symmetric",Name="input");
net = addLayers(net,layer);
for i = 1:numBlocks
dilationFactor = 2^(i-1);
layers = [
convolution1dLayer(filterSize,numFilters,DilationFactor=dilationFactor,Padding="causal",Name="conv1_"+i)
layerNormalizationLayer
spatialDropoutLayer(Name= "spat_drop_"+i,Probability=droupoutFactor)
convolution1dLayer(filterSize,numFilters,DilationFactor=dilationFactor,Padding="causal")
layerNormalizationLayer
reluLayer
spatialDropoutLayer(Name="spat_drop2_"+i,Probability=droupoutFactor)
additionLayer(2,Name="add_"+i)];
% Add and connect layers.
net = addLayers(net,layers);
net = connectLayers(net,outputName,"conv1_"+i);
end
net = connectLayers(net,outputName,"fc");
%Training Options
options = trainingOptions("adam", …
‘MaxEpochs’, 60, …
‘MiniBatchSize’, 1, …
‘InputDataFormat’, "CTB", …
‘Metrics’, "rmse", …
‘Verbose’, 0);
filtsize = optimizableVariable(‘filterSize’,[1,10],’Type’,’integer’)
numfilt = optimizableVariable(‘numFilters’,[20,60],’Type’,’integer’)
numblock = optimizableVariable(‘numBlocks’,[1,10],’Type’,’integer’)
dropout = optimizableVariable(‘dropoutfactor’,[0.001,0.01],’Type’,’integer’)
net = trainnet(traningdataX,trainingdataY,net,"mse",options);
fun = (x)@ %Not sure what to put here!
reuslts = bayesopt(,[filtsize, numfilt, numblock, droupout])Hi there I have built my own TCN model in matlab to predict a contunious output and am trying to figure out the best way to optimize the hyperparmeters: Filter Size, Number of Filters, Number of Blocks, and Drop out Factor. I am attempting to use the bayespot function, but am not sure what to use as my function handel and if this is the best method for this kind of network. Should I be using the experiment manger to do this instead (https://www.mathworks.com/help/deeplearning/ug/tune-experiment-hyperparameters-using-bayesian-optimization.html) Does anyone have an suggestions for my code or if there is another way to perform hyperparmeter optimization for this type of network achetecture? Thanks so much.
%Network
numFilters = 64;
filterSize = 5;
droupoutFactor = 0.005;
numBlocks = 5;
net = dlnetwork;
layer = sequenceInputLayer(numFeatures,Normalization="rescale-symmetric",Name="input");
net = addLayers(net,layer);
for i = 1:numBlocks
dilationFactor = 2^(i-1);
layers = [
convolution1dLayer(filterSize,numFilters,DilationFactor=dilationFactor,Padding="causal",Name="conv1_"+i)
layerNormalizationLayer
spatialDropoutLayer(Name= "spat_drop_"+i,Probability=droupoutFactor)
convolution1dLayer(filterSize,numFilters,DilationFactor=dilationFactor,Padding="causal")
layerNormalizationLayer
reluLayer
spatialDropoutLayer(Name="spat_drop2_"+i,Probability=droupoutFactor)
additionLayer(2,Name="add_"+i)];
% Add and connect layers.
net = addLayers(net,layers);
net = connectLayers(net,outputName,"conv1_"+i);
end
net = connectLayers(net,outputName,"fc");
%Training Options
options = trainingOptions("adam", …
‘MaxEpochs’, 60, …
‘MiniBatchSize’, 1, …
‘InputDataFormat’, "CTB", …
‘Metrics’, "rmse", …
‘Verbose’, 0);
filtsize = optimizableVariable(‘filterSize’,[1,10],’Type’,’integer’)
numfilt = optimizableVariable(‘numFilters’,[20,60],’Type’,’integer’)
numblock = optimizableVariable(‘numBlocks’,[1,10],’Type’,’integer’)
dropout = optimizableVariable(‘dropoutfactor’,[0.001,0.01],’Type’,’integer’)
net = trainnet(traningdataX,trainingdataY,net,"mse",options);
fun = (x)@ %Not sure what to put here!
reuslts = bayesopt(,[filtsize, numfilt, numblock, droupout]) Hi there I have built my own TCN model in matlab to predict a contunious output and am trying to figure out the best way to optimize the hyperparmeters: Filter Size, Number of Filters, Number of Blocks, and Drop out Factor. I am attempting to use the bayespot function, but am not sure what to use as my function handel and if this is the best method for this kind of network. Should I be using the experiment manger to do this instead (https://www.mathworks.com/help/deeplearning/ug/tune-experiment-hyperparameters-using-bayesian-optimization.html) Does anyone have an suggestions for my code or if there is another way to perform hyperparmeter optimization for this type of network achetecture? Thanks so much.
%Network
numFilters = 64;
filterSize = 5;
droupoutFactor = 0.005;
numBlocks = 5;
net = dlnetwork;
layer = sequenceInputLayer(numFeatures,Normalization="rescale-symmetric",Name="input");
net = addLayers(net,layer);
for i = 1:numBlocks
dilationFactor = 2^(i-1);
layers = [
convolution1dLayer(filterSize,numFilters,DilationFactor=dilationFactor,Padding="causal",Name="conv1_"+i)
layerNormalizationLayer
spatialDropoutLayer(Name= "spat_drop_"+i,Probability=droupoutFactor)
convolution1dLayer(filterSize,numFilters,DilationFactor=dilationFactor,Padding="causal")
layerNormalizationLayer
reluLayer
spatialDropoutLayer(Name="spat_drop2_"+i,Probability=droupoutFactor)
additionLayer(2,Name="add_"+i)];
% Add and connect layers.
net = addLayers(net,layers);
net = connectLayers(net,outputName,"conv1_"+i);
end
net = connectLayers(net,outputName,"fc");
%Training Options
options = trainingOptions("adam", …
‘MaxEpochs’, 60, …
‘MiniBatchSize’, 1, …
‘InputDataFormat’, "CTB", …
‘Metrics’, "rmse", …
‘Verbose’, 0);
filtsize = optimizableVariable(‘filterSize’,[1,10],’Type’,’integer’)
numfilt = optimizableVariable(‘numFilters’,[20,60],’Type’,’integer’)
numblock = optimizableVariable(‘numBlocks’,[1,10],’Type’,’integer’)
dropout = optimizableVariable(‘dropoutfactor’,[0.001,0.01],’Type’,’integer’)
net = trainnet(traningdataX,trainingdataY,net,"mse",options);
fun = (x)@ %Not sure what to put here!
reuslts = bayesopt(,[filtsize, numfilt, numblock, droupout]) optimization, machine learning, hyperparameters MATLAB Answers — New Questions
Can I use the fitcensemble function to create a Random Forest model?
I am new to machine learning classifiers.
I want to develop a Random Forest classification model with my IMU data.
I used the code below, and my question is: Can I call it a Random Forest model, or should I just call it a bagging ensemble model?
baggedEnsemble = fitcensemble(data_train(:,2:end), data_train(:,1),’Method’,’Bag’,’NumLearningCycles’,100);I am new to machine learning classifiers.
I want to develop a Random Forest classification model with my IMU data.
I used the code below, and my question is: Can I call it a Random Forest model, or should I just call it a bagging ensemble model?
baggedEnsemble = fitcensemble(data_train(:,2:end), data_train(:,1),’Method’,’Bag’,’NumLearningCycles’,100); I am new to machine learning classifiers.
I want to develop a Random Forest classification model with my IMU data.
I used the code below, and my question is: Can I call it a Random Forest model, or should I just call it a bagging ensemble model?
baggedEnsemble = fitcensemble(data_train(:,2:end), data_train(:,1),’Method’,’Bag’,’NumLearningCycles’,100); machine learning, random forest, ensemble, bagging, classification MATLAB Answers — New Questions
Questions about the Detailed Settings of Voronoi Diagrams ボロノイ図の細かな設定について質問です
I have been reading an example from a book and am trying to recreate the diagram using Voronoi diagrams. However, I want to consider a bounded region [0,1], [1,0], but when using the voronoi function, the lines extend beyond the boundaries. I would like to obtain information such as the area and centroid of the bounded regions, so I want to create the Voronoi diagram with these bounded constraints in mind. Is this possible?
ある書籍の例を読み、ボロノイ図を用いてその図を再現したいと考えています。
しかし有界の領域[0,1],[1,0]について考えたいところ、voronoiでは枠外を超えて線が伸びてしまいます。
有界領域の面積や重心などの情報を得たいため、ボロノイ図を有界の制約を踏まえて作成したいのですが可能でしょうか?
clear
close all
figure()
x = [0.2 0.6 0.9 0.7 0.8 0.5 0.4 0.1 0.3 0.5];
y = [0.7 0.9 0.8 0.6 0.3 0.4 0.2 0.1 0.3 0.5];
X = [x’,y’];
vrn_obj = voronoi(X(:,1),X(:,2));
[vx,vy] = voronoi(X(:,1),X(:,2));
edge_set =[vx’,vy’];
nump = size(X,1);
plabels = arrayfun(@(n) {sprintf(‘X%d’, n)}, (1:nump)’);
hold on
Hpl = text(X(:,1), X(:,2), plabels, ‘FontWeight’, …
‘bold’, ‘HorizontalAlignment’,’center’, …
‘BackgroundColor’, ‘none’);
dt = delaunayTriangulation(X);
hold on
triplot(dt,’–‘);
hold off
axis equal
% xlim([0 1])
% ylim([0 1])
grid onI have been reading an example from a book and am trying to recreate the diagram using Voronoi diagrams. However, I want to consider a bounded region [0,1], [1,0], but when using the voronoi function, the lines extend beyond the boundaries. I would like to obtain information such as the area and centroid of the bounded regions, so I want to create the Voronoi diagram with these bounded constraints in mind. Is this possible?
ある書籍の例を読み、ボロノイ図を用いてその図を再現したいと考えています。
しかし有界の領域[0,1],[1,0]について考えたいところ、voronoiでは枠外を超えて線が伸びてしまいます。
有界領域の面積や重心などの情報を得たいため、ボロノイ図を有界の制約を踏まえて作成したいのですが可能でしょうか?
clear
close all
figure()
x = [0.2 0.6 0.9 0.7 0.8 0.5 0.4 0.1 0.3 0.5];
y = [0.7 0.9 0.8 0.6 0.3 0.4 0.2 0.1 0.3 0.5];
X = [x’,y’];
vrn_obj = voronoi(X(:,1),X(:,2));
[vx,vy] = voronoi(X(:,1),X(:,2));
edge_set =[vx’,vy’];
nump = size(X,1);
plabels = arrayfun(@(n) {sprintf(‘X%d’, n)}, (1:nump)’);
hold on
Hpl = text(X(:,1), X(:,2), plabels, ‘FontWeight’, …
‘bold’, ‘HorizontalAlignment’,’center’, …
‘BackgroundColor’, ‘none’);
dt = delaunayTriangulation(X);
hold on
triplot(dt,’–‘);
hold off
axis equal
% xlim([0 1])
% ylim([0 1])
grid on I have been reading an example from a book and am trying to recreate the diagram using Voronoi diagrams. However, I want to consider a bounded region [0,1], [1,0], but when using the voronoi function, the lines extend beyond the boundaries. I would like to obtain information such as the area and centroid of the bounded regions, so I want to create the Voronoi diagram with these bounded constraints in mind. Is this possible?
ある書籍の例を読み、ボロノイ図を用いてその図を再現したいと考えています。
しかし有界の領域[0,1],[1,0]について考えたいところ、voronoiでは枠外を超えて線が伸びてしまいます。
有界領域の面積や重心などの情報を得たいため、ボロノイ図を有界の制約を踏まえて作成したいのですが可能でしょうか?
clear
close all
figure()
x = [0.2 0.6 0.9 0.7 0.8 0.5 0.4 0.1 0.3 0.5];
y = [0.7 0.9 0.8 0.6 0.3 0.4 0.2 0.1 0.3 0.5];
X = [x’,y’];
vrn_obj = voronoi(X(:,1),X(:,2));
[vx,vy] = voronoi(X(:,1),X(:,2));
edge_set =[vx’,vy’];
nump = size(X,1);
plabels = arrayfun(@(n) {sprintf(‘X%d’, n)}, (1:nump)’);
hold on
Hpl = text(X(:,1), X(:,2), plabels, ‘FontWeight’, …
‘bold’, ‘HorizontalAlignment’,’center’, …
‘BackgroundColor’, ‘none’);
dt = delaunayTriangulation(X);
hold on
triplot(dt,’–‘);
hold off
axis equal
% xlim([0 1])
% ylim([0 1])
grid on plot, matlab, graph MATLAB Answers — New Questions
C2000 Modbus RTU Slave
Hi,
I’m programming a DSP TMS320F28069M using Simulink. I have successfully received data and unpack that receive data via uint16 format. And I use a matlab function block. This reason that I used, to compare the required bits for Modbus communication. Although byte unpack block output type is uint16, I couldn’t use this receive value. For example, let the SCI received data be ’01 02 00 00 00 00 02 10′. First of compare the first byte. If first byte is 01, transmits the eighth byte. But if not sends second byte. I always saw the second byte was gone. I guess received or compare data type is wrong but I couldn’t find it. I changed the value C1 instead of 01 in the if loop. When I enter the C1 byte into the system, an error occurs How can I do this?
Inside the function block:Hi,
I’m programming a DSP TMS320F28069M using Simulink. I have successfully received data and unpack that receive data via uint16 format. And I use a matlab function block. This reason that I used, to compare the required bits for Modbus communication. Although byte unpack block output type is uint16, I couldn’t use this receive value. For example, let the SCI received data be ’01 02 00 00 00 00 02 10′. First of compare the first byte. If first byte is 01, transmits the eighth byte. But if not sends second byte. I always saw the second byte was gone. I guess received or compare data type is wrong but I couldn’t find it. I changed the value C1 instead of 01 in the if loop. When I enter the C1 byte into the system, an error occurs How can I do this?
Inside the function block: Hi,
I’m programming a DSP TMS320F28069M using Simulink. I have successfully received data and unpack that receive data via uint16 format. And I use a matlab function block. This reason that I used, to compare the required bits for Modbus communication. Although byte unpack block output type is uint16, I couldn’t use this receive value. For example, let the SCI received data be ’01 02 00 00 00 00 02 10′. First of compare the first byte. If first byte is 01, transmits the eighth byte. But if not sends second byte. I always saw the second byte was gone. I guess received or compare data type is wrong but I couldn’t find it. I changed the value C1 instead of 01 in the if loop. When I enter the C1 byte into the system, an error occurs How can I do this?
Inside the function block: modbus, sci MATLAB Answers — New Questions
how to separate the real and imaginary parts inside a cell
i have a cell of size 1X2. inside the cell there are 2 matrices of size 32X32. i want to separate the real and imaginary of both the matrices that is inside the cell the two matrices should be 32X32X2. and finally i want the size to be 2X32X32X2. How to do it.i have a cell of size 1X2. inside the cell there are 2 matrices of size 32X32. i want to separate the real and imaginary of both the matrices that is inside the cell the two matrices should be 32X32X2. and finally i want the size to be 2X32X32X2. How to do it. i have a cell of size 1X2. inside the cell there are 2 matrices of size 32X32. i want to separate the real and imaginary of both the matrices that is inside the cell the two matrices should be 32X32X2. and finally i want the size to be 2X32X32X2. How to do it. cell array, real, imaginary MATLAB Answers — New Questions
Chapter and section number is not increased in report generator.
Chapter and section number is not increased in report generator.
I use mlreportgen.report, mlerportgen.dom class.Chapter and section number is not increased in report generator.
I use mlreportgen.report, mlerportgen.dom class. Chapter and section number is not increased in report generator.
I use mlreportgen.report, mlerportgen.dom class. simulink, report generator, mlreportgen MATLAB Answers — New Questions
Error in save to mat file
I have got following error while saving the agent for a DQN-RL problem. The error doesnt pop-up always, however, most of the time the saved .mat file is corrupt Similar problem in another PC too. Both the PC is having enough space in the HDD and of 64GB RAM. Sometimes it saves successfully with each MAT file of 1GB size,otherwise, the corrupted MAT files are in KBs.
Version: MATLAB 2021a
Error:
Error using save
Unable to save file ‘C:UsersDocumentsMATLAB 2021initial_agent.mat’. The file could not be closed, and might now be corrupt.
Error in DQN__Training (line 101)
save("initial_agent","agent")I have got following error while saving the agent for a DQN-RL problem. The error doesnt pop-up always, however, most of the time the saved .mat file is corrupt Similar problem in another PC too. Both the PC is having enough space in the HDD and of 64GB RAM. Sometimes it saves successfully with each MAT file of 1GB size,otherwise, the corrupted MAT files are in KBs.
Version: MATLAB 2021a
Error:
Error using save
Unable to save file ‘C:UsersDocumentsMATLAB 2021initial_agent.mat’. The file could not be closed, and might now be corrupt.
Error in DQN__Training (line 101)
save("initial_agent","agent") I have got following error while saving the agent for a DQN-RL problem. The error doesnt pop-up always, however, most of the time the saved .mat file is corrupt Similar problem in another PC too. Both the PC is having enough space in the HDD and of 64GB RAM. Sometimes it saves successfully with each MAT file of 1GB size,otherwise, the corrupted MAT files are in KBs.
Version: MATLAB 2021a
Error:
Error using save
Unable to save file ‘C:UsersDocumentsMATLAB 2021initial_agent.mat’. The file could not be closed, and might now be corrupt.
Error in DQN__Training (line 101)
save("initial_agent","agent") save MATLAB Answers — New Questions
Segregating an EMG signal based on activation
Hi everyone,
I have two arrays, one of which stores EMG readings in mV from a hand and the second storing time in seconds. I have plotted these against eachother and am now trying to segregate the signal into separate cycles. I want to segragate the signal from the start of 1 activity to the beginning of the next activation (please see attached photo). Please could you give me any ideas of how I might do this.
Thanks,Hi everyone,
I have two arrays, one of which stores EMG readings in mV from a hand and the second storing time in seconds. I have plotted these against eachother and am now trying to segregate the signal into separate cycles. I want to segragate the signal from the start of 1 activity to the beginning of the next activation (please see attached photo). Please could you give me any ideas of how I might do this.
Thanks, Hi everyone,
I have two arrays, one of which stores EMG readings in mV from a hand and the second storing time in seconds. I have plotted these against eachother and am now trying to segregate the signal into separate cycles. I want to segragate the signal from the start of 1 activity to the beginning of the next activation (please see attached photo). Please could you give me any ideas of how I might do this.
Thanks, emg, signal processing MATLAB Answers — New Questions
Replicate the Event-Driven Task in External Mode
I am trying to replicate the simulation results of the event-driven task in external mode. I ran in R2022a. My board is Zedboard. The solver is in fixed step.
After building and running it, it has several warnings, including
Saving external mode simulation output as a single object is not supported because the workspace variable ‘out’ is not created during model code execution. To suppress the warning, set ‘ReturnWorkspaceOutputs’ to ‘off’.
No data has been selected for uploading.
When I open Data Inspector, the processed data is always zero. How to make the process data to generate the results like simulation?I am trying to replicate the simulation results of the event-driven task in external mode. I ran in R2022a. My board is Zedboard. The solver is in fixed step.
After building and running it, it has several warnings, including
Saving external mode simulation output as a single object is not supported because the workspace variable ‘out’ is not created during model code execution. To suppress the warning, set ‘ReturnWorkspaceOutputs’ to ‘off’.
No data has been selected for uploading.
When I open Data Inspector, the processed data is always zero. How to make the process data to generate the results like simulation? I am trying to replicate the simulation results of the event-driven task in external mode. I ran in R2022a. My board is Zedboard. The solver is in fixed step.
After building and running it, it has several warnings, including
Saving external mode simulation output as a single object is not supported because the workspace variable ‘out’ is not created during model code execution. To suppress the warning, set ‘ReturnWorkspaceOutputs’ to ‘off’.
No data has been selected for uploading.
When I open Data Inspector, the processed data is always zero. How to make the process data to generate the results like simulation? external mode, event-driven task MATLAB Answers — New Questions
test test test test
testtest test testing test, testing test s MATLAB Answers — New Questions
AD-FMCOMMS5 and ZC702 MATLAB Support
Hi,
We are currently conducting a adaptive null steering/beamforming project and decided to use AD-FMCOMMS5 and ZC706 due to direct MathWorks integration support. During first phase we want to capture RF data and post-process it in MATLAB. ZC706 is now obsolete and that leads us to use different SoC boards like ZC702.
There is a uncertainty about AD-FMCOMMS5 and ZC702, in particular topics MATLAB staff says this system "potentially" works but in other topics people say these boards are not supported for MathWorks integration.
Is there any way that i get direct approval about AD-FMCOMMS5 and ZC702 integration with Mathworks from MATLAB staff or researchers ?
Thanks.Hi,
We are currently conducting a adaptive null steering/beamforming project and decided to use AD-FMCOMMS5 and ZC706 due to direct MathWorks integration support. During first phase we want to capture RF data and post-process it in MATLAB. ZC706 is now obsolete and that leads us to use different SoC boards like ZC702.
There is a uncertainty about AD-FMCOMMS5 and ZC702, in particular topics MATLAB staff says this system "potentially" works but in other topics people say these boards are not supported for MathWorks integration.
Is there any way that i get direct approval about AD-FMCOMMS5 and ZC702 integration with Mathworks from MATLAB staff or researchers ?
Thanks. Hi,
We are currently conducting a adaptive null steering/beamforming project and decided to use AD-FMCOMMS5 and ZC706 due to direct MathWorks integration support. During first phase we want to capture RF data and post-process it in MATLAB. ZC706 is now obsolete and that leads us to use different SoC boards like ZC702.
There is a uncertainty about AD-FMCOMMS5 and ZC702, in particular topics MATLAB staff says this system "potentially" works but in other topics people say these boards are not supported for MathWorks integration.
Is there any way that i get direct approval about AD-FMCOMMS5 and ZC702 integration with Mathworks from MATLAB staff or researchers ?
Thanks. beamforming, null steering, zynq, zc702, zc706, soc, fmcomms5, ad-fmcomms5 MATLAB Answers — New Questions
name mismatch error when build the model using embedded coder
when I build the model I get the name mismatch error for two calibratable signals . The signals are in the data dictionary , and I use them in the model by pulling from the dd with the same name . can anyone point me out what possibly cause this error?when I build the model I get the name mismatch error for two calibratable signals . The signals are in the data dictionary , and I use them in the model by pulling from the dd with the same name . can anyone point me out what possibly cause this error? when I build the model I get the name mismatch error for two calibratable signals . The signals are in the data dictionary , and I use them in the model by pulling from the dd with the same name . can anyone point me out what possibly cause this error? simulink, embedded coder, build model MATLAB Answers — New Questions
how to display (3000x4000x4) matrix as image in matlab
I have created a 3000x4000x4 matrix in matlab, when I try to use image() function to display it as a picture, matlab told me image() function could only display m*n or m*n*3 matrix. So how could I display m*n*4 matrix as a picture? Many thanks.I have created a 3000x4000x4 matrix in matlab, when I try to use image() function to display it as a picture, matlab told me image() function could only display m*n or m*n*3 matrix. So how could I display m*n*4 matrix as a picture? Many thanks. I have created a 3000x4000x4 matrix in matlab, when I try to use image() function to display it as a picture, matlab told me image() function could only display m*n or m*n*3 matrix. So how could I display m*n*4 matrix as a picture? Many thanks. display m*n*4 matrix as a image MATLAB Answers — New Questions
Writing legends for MATLAB figures with subscripts
What is the solution for writing legends for MATLAB figures with subscripts?What is the solution for writing legends for MATLAB figures with subscripts? What is the solution for writing legends for MATLAB figures with subscripts? figure, legend, subscript MATLAB Answers — New Questions
Extraction of the spatial coordinates of a curve and calculation of the normal line to each of its points
Hello everyone
I have the following dataset: https://www.dropbox.com/scl/fo/3dthvtj2ex9gmhsu3lkrq/AJt2KVYls3YM89v5SRmSEWk?rlkey=r63d0ej2sv7ku8i4ardla5pvi&dl=0, which gives rise to the data on the panel mz of the figure below:
My idea is to extract the (a,b) set of points that define the whole right side of the whitish curve. Once that it is done, I will need to extract, for each of the points of this curve, the normal line along the track (that it is, the (a,b) coordinates together with the corresponding values of the mz values).
Any ideas on how to do this efficiently?
Additional information (September 3, 2024)
When I talk about the normal to the tangent at each point of the curve mz, I am thinking about something like this:
where the green X symbol corresponds to a certain point of the curve, the black line to the tangent to the curve at that specific (x,y) point, and the dashed yellow line refers to the normal to the tangent line that (x,y) point. I would be interested in extracting the mz value all along that normal line inside the boundaries of the sample. So I would say that some grid data process would be important to make if not too many points actually exist in the given data set.Hello everyone
I have the following dataset: https://www.dropbox.com/scl/fo/3dthvtj2ex9gmhsu3lkrq/AJt2KVYls3YM89v5SRmSEWk?rlkey=r63d0ej2sv7ku8i4ardla5pvi&dl=0, which gives rise to the data on the panel mz of the figure below:
My idea is to extract the (a,b) set of points that define the whole right side of the whitish curve. Once that it is done, I will need to extract, for each of the points of this curve, the normal line along the track (that it is, the (a,b) coordinates together with the corresponding values of the mz values).
Any ideas on how to do this efficiently?
Additional information (September 3, 2024)
When I talk about the normal to the tangent at each point of the curve mz, I am thinking about something like this:
where the green X symbol corresponds to a certain point of the curve, the black line to the tangent to the curve at that specific (x,y) point, and the dashed yellow line refers to the normal to the tangent line that (x,y) point. I would be interested in extracting the mz value all along that normal line inside the boundaries of the sample. So I would say that some grid data process would be important to make if not too many points actually exist in the given data set. Hello everyone
I have the following dataset: https://www.dropbox.com/scl/fo/3dthvtj2ex9gmhsu3lkrq/AJt2KVYls3YM89v5SRmSEWk?rlkey=r63d0ej2sv7ku8i4ardla5pvi&dl=0, which gives rise to the data on the panel mz of the figure below:
My idea is to extract the (a,b) set of points that define the whole right side of the whitish curve. Once that it is done, I will need to extract, for each of the points of this curve, the normal line along the track (that it is, the (a,b) coordinates together with the corresponding values of the mz values).
Any ideas on how to do this efficiently?
Additional information (September 3, 2024)
When I talk about the normal to the tangent at each point of the curve mz, I am thinking about something like this:
where the green X symbol corresponds to a certain point of the curve, the black line to the tangent to the curve at that specific (x,y) point, and the dashed yellow line refers to the normal to the tangent line that (x,y) point. I would be interested in extracting the mz value all along that normal line inside the boundaries of the sample. So I would say that some grid data process would be important to make if not too many points actually exist in the given data set. data pattern extraction, normal lines to a curve MATLAB Answers — New Questions
(Enhancement Request)vision.VideoPlayer should be presented as a more modern player
In the past two years, MATHWORKS has updated the image viewer and audio viewer, giving them a more modern interface with features like play, pause, fast forward, and some interactive tools that are more commonly found in typical third-party players. However, the video player has not seen any updates. For instance, the vision.VideoPlayer could benefit from a more modern player interface. Perhaps I haven’t found a suitable built-in player yet. It would be great if there were support for custom image processing and audio processing algorithms that could be played in a more modern interface in real time.
Additionally, I found it quite challenging to develop a modern video player from scratch in App Designer.
—————————————————————————————————————–
BTW,the following picture shows the built-in function uihtml function showing a more modern playback interface with controls for play, pause and so on. But can not add real-time image processing algorithms.In the past two years, MATHWORKS has updated the image viewer and audio viewer, giving them a more modern interface with features like play, pause, fast forward, and some interactive tools that are more commonly found in typical third-party players. However, the video player has not seen any updates. For instance, the vision.VideoPlayer could benefit from a more modern player interface. Perhaps I haven’t found a suitable built-in player yet. It would be great if there were support for custom image processing and audio processing algorithms that could be played in a more modern interface in real time.
Additionally, I found it quite challenging to develop a modern video player from scratch in App Designer.
—————————————————————————————————————–
BTW,the following picture shows the built-in function uihtml function showing a more modern playback interface with controls for play, pause and so on. But can not add real-time image processing algorithms. In the past two years, MATHWORKS has updated the image viewer and audio viewer, giving them a more modern interface with features like play, pause, fast forward, and some interactive tools that are more commonly found in typical third-party players. However, the video player has not seen any updates. For instance, the vision.VideoPlayer could benefit from a more modern player interface. Perhaps I haven’t found a suitable built-in player yet. It would be great if there were support for custom image processing and audio processing algorithms that could be played in a more modern interface in real time.
Additionally, I found it quite challenging to develop a modern video player from scratch in App Designer.
—————————————————————————————————————–
BTW,the following picture shows the built-in function uihtml function showing a more modern playback interface with controls for play, pause and so on. But can not add real-time image processing algorithms. video player, image processing, computer vision, appdesigner MATLAB Answers — New Questions