Category: Matlab
Category Archives: Matlab
PSpice matlab co-simulation
Can someone help me with this problem?
After I configured the co-simulation environment, I clicked the run button in simulink, and finally the matlab crash task box popped up. The crash log file is as follows:
——————————————————————————–
Access violation detected at 2024-08-23 11:04:18 +0800
——————————————————————————–
Configuration:
Crash Decoding : Disabled – No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Graphics Driver : Uninitialized hardware
Graphics card 1 : NVIDIA ( 0x10de ) NVIDIA GeForce RTX 2060 Version 27.21.14.6109 (2020-12-31)
Graphics card 2 : Advanced Micro Devices, Inc. ( 0x1002 ) AMD Radeon(TM) Graphics Version 31.0.14046.0 (2023-3-29)
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : win64
MATLAB Entitlement ID : 6257193
MATLAB Root : E:
MATLAB Version : 9.13.0.2049777 (R2022b)
OpenGL : hardware
Operating System : Microsoft Windows 10 专业版
Process ID : 4572
Processor ID : x86 Family 23 Model 96 Stepping 1, AuthenticAMD
Session Key : 48ca539b-11d4-4b26-8160-2f1f574fff65
Window System : Version 10.0 (Build 19044)
Fault Count: 1
Abnormal termination:
Access violation
Current Thread: ” id 17540
Register State (from fault):
RAX = 3e112e0be826d695 RBX = 0000000000000002
RCX = 00000207c4e87d50 RDX = 000000a5b8fff0f0
RSP = 000000a5b8fff0a8 RBP = 000000000000002a
RSI = 00007ffe3b362a58 RDI = 00007ffe3b345d78
R8 = 0000020724ce0110 R9 = 0000000000004000
R10 = 0000000000000000 R11 = 0000000000000246
R12 = 0000000000000001 R13 = 00007ffe3be3e2f0
R14 = 00007ffe3b3ef180 R15 = 000000000000002a
RIP = 00007ffe3be32166 EFL = 00010202
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x00007ffe3be32166 E:CadenceSPB_17.2toolspspiceslpspsstub.dll+00008550
[ 1] 0x00007ffe3adfa844 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00501828 pspMatlabEng_eng::operator=+00022116
[ 2] 0x00007ffe3ae31c6a E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00728170 PSpiceNewDevEqDLL+00138858
[ 3] 0x00007ffe3ad8f101 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00061697 InitializeDevice+00043665
[ 4] 0x00007ffe3af7dc72 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+02088050 setHInstanceExt+00095330
[ 5] 0x00007ffe3adf3171 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00471409 descSetMinTerminalCount+00108705
[ 6] 0x00007ffe3adf30d9 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00471257 descSetMinTerminalCount+00108553
[ 7] 0x00007ffe3af592ad E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+01938093 PSpiceDoSimulinkAnalysis+00000925
[ 8] 0x00007ffe3be3155a E:CadenceSPB_17.2toolspspiceslpspsstub.dll+00005466
[ 9] 0x00007ffe3be32584 E:CadenceSPB_17.2toolspspiceslpspsstub.dll+00009604
[ 10] 0x00007ffe3be73fef E:binwin64MSVCR110.dll+00147439 beginthreadex+00000263
[ 11] 0x00007ffe3be74196 E:binwin64MSVCR110.dll+00147862 endthreadex+00000402
[ 12] 0x00007fff2b4d7034 C:WindowsSystem32KERNEL32.DLL+00094260 BaseThreadInitThunk+00000020
[ 13] 0x00007fff2bf026a1 C:WindowsSYSTEM32ntdll.dll+00337569 RtlUserThreadStart+00000033
Program State:
Most Recent Simulink Activity:
playSimulationAction : OK in editor 1 at Fri Aug 23 11:03:58 2024Can someone help me with this problem?
After I configured the co-simulation environment, I clicked the run button in simulink, and finally the matlab crash task box popped up. The crash log file is as follows:
——————————————————————————–
Access violation detected at 2024-08-23 11:04:18 +0800
——————————————————————————–
Configuration:
Crash Decoding : Disabled – No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Graphics Driver : Uninitialized hardware
Graphics card 1 : NVIDIA ( 0x10de ) NVIDIA GeForce RTX 2060 Version 27.21.14.6109 (2020-12-31)
Graphics card 2 : Advanced Micro Devices, Inc. ( 0x1002 ) AMD Radeon(TM) Graphics Version 31.0.14046.0 (2023-3-29)
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : win64
MATLAB Entitlement ID : 6257193
MATLAB Root : E:
MATLAB Version : 9.13.0.2049777 (R2022b)
OpenGL : hardware
Operating System : Microsoft Windows 10 专业版
Process ID : 4572
Processor ID : x86 Family 23 Model 96 Stepping 1, AuthenticAMD
Session Key : 48ca539b-11d4-4b26-8160-2f1f574fff65
Window System : Version 10.0 (Build 19044)
Fault Count: 1
Abnormal termination:
Access violation
Current Thread: ” id 17540
Register State (from fault):
RAX = 3e112e0be826d695 RBX = 0000000000000002
RCX = 00000207c4e87d50 RDX = 000000a5b8fff0f0
RSP = 000000a5b8fff0a8 RBP = 000000000000002a
RSI = 00007ffe3b362a58 RDI = 00007ffe3b345d78
R8 = 0000020724ce0110 R9 = 0000000000004000
R10 = 0000000000000000 R11 = 0000000000000246
R12 = 0000000000000001 R13 = 00007ffe3be3e2f0
R14 = 00007ffe3b3ef180 R15 = 000000000000002a
RIP = 00007ffe3be32166 EFL = 00010202
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x00007ffe3be32166 E:CadenceSPB_17.2toolspspiceslpspsstub.dll+00008550
[ 1] 0x00007ffe3adfa844 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00501828 pspMatlabEng_eng::operator=+00022116
[ 2] 0x00007ffe3ae31c6a E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00728170 PSpiceNewDevEqDLL+00138858
[ 3] 0x00007ffe3ad8f101 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00061697 InitializeDevice+00043665
[ 4] 0x00007ffe3af7dc72 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+02088050 setHInstanceExt+00095330
[ 5] 0x00007ffe3adf3171 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00471409 descSetMinTerminalCount+00108705
[ 6] 0x00007ffe3adf30d9 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00471257 descSetMinTerminalCount+00108553
[ 7] 0x00007ffe3af592ad E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+01938093 PSpiceDoSimulinkAnalysis+00000925
[ 8] 0x00007ffe3be3155a E:CadenceSPB_17.2toolspspiceslpspsstub.dll+00005466
[ 9] 0x00007ffe3be32584 E:CadenceSPB_17.2toolspspiceslpspsstub.dll+00009604
[ 10] 0x00007ffe3be73fef E:binwin64MSVCR110.dll+00147439 beginthreadex+00000263
[ 11] 0x00007ffe3be74196 E:binwin64MSVCR110.dll+00147862 endthreadex+00000402
[ 12] 0x00007fff2b4d7034 C:WindowsSystem32KERNEL32.DLL+00094260 BaseThreadInitThunk+00000020
[ 13] 0x00007fff2bf026a1 C:WindowsSYSTEM32ntdll.dll+00337569 RtlUserThreadStart+00000033
Program State:
Most Recent Simulink Activity:
playSimulationAction : OK in editor 1 at Fri Aug 23 11:03:58 2024 Can someone help me with this problem?
After I configured the co-simulation environment, I clicked the run button in simulink, and finally the matlab crash task box popped up. The crash log file is as follows:
——————————————————————————–
Access violation detected at 2024-08-23 11:04:18 +0800
——————————————————————————–
Configuration:
Crash Decoding : Disabled – No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Graphics Driver : Uninitialized hardware
Graphics card 1 : NVIDIA ( 0x10de ) NVIDIA GeForce RTX 2060 Version 27.21.14.6109 (2020-12-31)
Graphics card 2 : Advanced Micro Devices, Inc. ( 0x1002 ) AMD Radeon(TM) Graphics Version 31.0.14046.0 (2023-3-29)
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : win64
MATLAB Entitlement ID : 6257193
MATLAB Root : E:
MATLAB Version : 9.13.0.2049777 (R2022b)
OpenGL : hardware
Operating System : Microsoft Windows 10 专业版
Process ID : 4572
Processor ID : x86 Family 23 Model 96 Stepping 1, AuthenticAMD
Session Key : 48ca539b-11d4-4b26-8160-2f1f574fff65
Window System : Version 10.0 (Build 19044)
Fault Count: 1
Abnormal termination:
Access violation
Current Thread: ” id 17540
Register State (from fault):
RAX = 3e112e0be826d695 RBX = 0000000000000002
RCX = 00000207c4e87d50 RDX = 000000a5b8fff0f0
RSP = 000000a5b8fff0a8 RBP = 000000000000002a
RSI = 00007ffe3b362a58 RDI = 00007ffe3b345d78
R8 = 0000020724ce0110 R9 = 0000000000004000
R10 = 0000000000000000 R11 = 0000000000000246
R12 = 0000000000000001 R13 = 00007ffe3be3e2f0
R14 = 00007ffe3b3ef180 R15 = 000000000000002a
RIP = 00007ffe3be32166 EFL = 00010202
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x00007ffe3be32166 E:CadenceSPB_17.2toolspspiceslpspsstub.dll+00008550
[ 1] 0x00007ffe3adfa844 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00501828 pspMatlabEng_eng::operator=+00022116
[ 2] 0x00007ffe3ae31c6a E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00728170 PSpiceNewDevEqDLL+00138858
[ 3] 0x00007ffe3ad8f101 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00061697 InitializeDevice+00043665
[ 4] 0x00007ffe3af7dc72 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+02088050 setHInstanceExt+00095330
[ 5] 0x00007ffe3adf3171 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00471409 descSetMinTerminalCount+00108705
[ 6] 0x00007ffe3adf30d9 E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+00471257 descSetMinTerminalCount+00108553
[ 7] 0x00007ffe3af592ad E:CadenceSPB_17.2toolsbinorPSP_ENG64.dll+01938093 PSpiceDoSimulinkAnalysis+00000925
[ 8] 0x00007ffe3be3155a E:CadenceSPB_17.2toolspspiceslpspsstub.dll+00005466
[ 9] 0x00007ffe3be32584 E:CadenceSPB_17.2toolspspiceslpspsstub.dll+00009604
[ 10] 0x00007ffe3be73fef E:binwin64MSVCR110.dll+00147439 beginthreadex+00000263
[ 11] 0x00007ffe3be74196 E:binwin64MSVCR110.dll+00147862 endthreadex+00000402
[ 12] 0x00007fff2b4d7034 C:WindowsSystem32KERNEL32.DLL+00094260 BaseThreadInitThunk+00000020
[ 13] 0x00007fff2bf026a1 C:WindowsSYSTEM32ntdll.dll+00337569 RtlUserThreadStart+00000033
Program State:
Most Recent Simulink Activity:
playSimulationAction : OK in editor 1 at Fri Aug 23 11:03:58 2024 pspice simulink MATLAB Answers — New Questions
how to change slope of the grid line in logarithmic scale?
x=1:10;
y=exp(.3).*x.^(1); % equation 1
loglog(x,y);
grid on
I want to change the grid line of y axis with slope of equation 1.x=1:10;
y=exp(.3).*x.^(1); % equation 1
loglog(x,y);
grid on
I want to change the grid line of y axis with slope of equation 1. x=1:10;
y=exp(.3).*x.^(1); % equation 1
loglog(x,y);
grid on
I want to change the grid line of y axis with slope of equation 1. grid line, slope, logarithmic MATLAB Answers — New Questions
How to generate a triggered pulse using Simulink
I want to generate a pulse using Simulink when triggered. The output signal is initially 0, then becomes 1 when triggered for a specified time, then -1 for the same amount of time, then back to 0 and hold until triggered again. How can I do this using Simulink.I want to generate a pulse using Simulink when triggered. The output signal is initially 0, then becomes 1 when triggered for a specified time, then -1 for the same amount of time, then back to 0 and hold until triggered again. How can I do this using Simulink. I want to generate a pulse using Simulink when triggered. The output signal is initially 0, then becomes 1 when triggered for a specified time, then -1 for the same amount of time, then back to 0 and hold until triggered again. How can I do this using Simulink. trigger pulse MATLAB Answers — New Questions
figure resize behavior control: from bottom or from top
Hi, I encountered a problem when I resized a figure: The aim of resizing is to manually drag the top/bottom boundary to adjust the panel size, in order to hide the label and only show the buttons. However, the reality is that no matter where I drag, it is the top space hidden, but the space between the label and bottom remains constant. I can only hide the buttons or hide the buttons and label together, but I cannot find a way to resize to keep the bottom. Is there a way to reverse the direction of resizing?
fig = figure(‘Name’,’GUI with Buttons and Labels’,’NumberTitle’,’off’,’Position’,[100 100 400 300]);
% Create buttons
btn1 = uicontrol(fig,’Style’,’pushbutton’,’String’,’Button 1′,’Position’,[50 200 100 30]);
btn2 = uicontrol(fig,’Style’,’pushbutton’,’String’,’Button 2′,’Position’,[150 200 100 30]);
btn3 = uicontrol(fig,’Style’,’pushbutton’,’String’,’Button 3′,’Position’,[250 200 100 30]);
% Create labels
lbl1 = uicontrol(fig,’Style’,’text’,’String’,’Label 1′,’Position’,[50 150 100 30]);
lbl2 = uicontrol(fig,’Style’,’text’,’String’,’Label 2′,’Position’,[150 150 100 30]);
lbl3 = uicontrol(fig,’Style’,’text’,’String’,’Label 3′,’Position’,[250 150 100 30]);Hi, I encountered a problem when I resized a figure: The aim of resizing is to manually drag the top/bottom boundary to adjust the panel size, in order to hide the label and only show the buttons. However, the reality is that no matter where I drag, it is the top space hidden, but the space between the label and bottom remains constant. I can only hide the buttons or hide the buttons and label together, but I cannot find a way to resize to keep the bottom. Is there a way to reverse the direction of resizing?
fig = figure(‘Name’,’GUI with Buttons and Labels’,’NumberTitle’,’off’,’Position’,[100 100 400 300]);
% Create buttons
btn1 = uicontrol(fig,’Style’,’pushbutton’,’String’,’Button 1′,’Position’,[50 200 100 30]);
btn2 = uicontrol(fig,’Style’,’pushbutton’,’String’,’Button 2′,’Position’,[150 200 100 30]);
btn3 = uicontrol(fig,’Style’,’pushbutton’,’String’,’Button 3′,’Position’,[250 200 100 30]);
% Create labels
lbl1 = uicontrol(fig,’Style’,’text’,’String’,’Label 1′,’Position’,[50 150 100 30]);
lbl2 = uicontrol(fig,’Style’,’text’,’String’,’Label 2′,’Position’,[150 150 100 30]);
lbl3 = uicontrol(fig,’Style’,’text’,’String’,’Label 3′,’Position’,[250 150 100 30]); Hi, I encountered a problem when I resized a figure: The aim of resizing is to manually drag the top/bottom boundary to adjust the panel size, in order to hide the label and only show the buttons. However, the reality is that no matter where I drag, it is the top space hidden, but the space between the label and bottom remains constant. I can only hide the buttons or hide the buttons and label together, but I cannot find a way to resize to keep the bottom. Is there a way to reverse the direction of resizing?
fig = figure(‘Name’,’GUI with Buttons and Labels’,’NumberTitle’,’off’,’Position’,[100 100 400 300]);
% Create buttons
btn1 = uicontrol(fig,’Style’,’pushbutton’,’String’,’Button 1′,’Position’,[50 200 100 30]);
btn2 = uicontrol(fig,’Style’,’pushbutton’,’String’,’Button 2′,’Position’,[150 200 100 30]);
btn3 = uicontrol(fig,’Style’,’pushbutton’,’String’,’Button 3′,’Position’,[250 200 100 30]);
% Create labels
lbl1 = uicontrol(fig,’Style’,’text’,’String’,’Label 1′,’Position’,[50 150 100 30]);
lbl2 = uicontrol(fig,’Style’,’text’,’String’,’Label 2′,’Position’,[150 150 100 30]);
lbl3 = uicontrol(fig,’Style’,’text’,’String’,’Label 3′,’Position’,[250 150 100 30]); figure, resize MATLAB Answers — New Questions
Extracting Nodes in MATLAB
I have generated a RVE. After meshing, i want to extract the nodes of the two opposite edges in MATLAB. I have use the code below, but it is giving blank.
clear;
fileID = fopen(‘new.txt’);
formatSpec = ‘%s’;
N = 8;
% reads file data, using the formatSpec N times
% c_h: cell header
c_h = textscan(fileID,formatSpec,N,’delimiter’,’|’);
% Read coordinates for nodes on the two opposite surfaces
% Save them in a cell array whose first and fourth columns are node #
% rest columns are x,y,z coordinates
% c_cord
c_cord = textscan(fileID,’%d %f %f %f %d %f %f %f’);
fclose(fileID);
%%
% Turn cell array which stored coordinates info. for points on left and
% right side of RVE into a sorted matrix
% Initialize matrix
cordMatrix=[];
for i=1:N
c1_cell=c_cord(1,i);
c1_elem=c1_cell{1,1};
cordMatrix(:,i)=c1_elem;
end
% Sort the matrix by the third column-Y coordinates
% sortedMatrixByLy-sorted matrix by left y coordinates
sortedMatrixByLy=sortrows(cordMatrix, 3);
% sortedMatrixByRy-sorted matrix by right y coordinates
sortedMatrixByRy=sortrows(cordMatrix, 3);
%%
% pairwise distance between left and right side sets of points
% # of points on Left side and right side do NOT have to the the same
Left=sortedMatrixByLy(:,1:4);
Right=sortedMatrixByRy(:,5:8);
% Fetch the x,y,z coordinates of left side points
LC=Left(:,2:4);
% Fetch the x,y,z coordinates of right side points
RC=Right(:,2:4);
% Compute all the distances between points on left and right side
% i.e. left has M points, right has N points, size of D matrix is M*N
D = pdist2(LC,RC);
%%
% Find the minimum distance value in each row of D and
% return the corresponding indices
DD=D;
[Sml,ind] = min(DD,[],2);
for j=1:size(DD,1)
[Sml(j),ind(j)] = min(DD(j,:),[],2);
% Replace the value in the same column of ind(j) by a very large number
% eg.999999 in here to avoid duplicat indice (i.e. the same point on one
% side used more than once)
DD(:,ind(j))=999999;
end
% Based on the returned indices find the paired points on left and right
% sides which has minimum distances
% The paired nodes then can be incorporated into FEA package Abaqus input file to
% define Periodic Boundary Conditions by using "Equations" in Abaqus
% pn:parid nodes
pn=[Left(:,1) Right(ind,1)]I have generated a RVE. After meshing, i want to extract the nodes of the two opposite edges in MATLAB. I have use the code below, but it is giving blank.
clear;
fileID = fopen(‘new.txt’);
formatSpec = ‘%s’;
N = 8;
% reads file data, using the formatSpec N times
% c_h: cell header
c_h = textscan(fileID,formatSpec,N,’delimiter’,’|’);
% Read coordinates for nodes on the two opposite surfaces
% Save them in a cell array whose first and fourth columns are node #
% rest columns are x,y,z coordinates
% c_cord
c_cord = textscan(fileID,’%d %f %f %f %d %f %f %f’);
fclose(fileID);
%%
% Turn cell array which stored coordinates info. for points on left and
% right side of RVE into a sorted matrix
% Initialize matrix
cordMatrix=[];
for i=1:N
c1_cell=c_cord(1,i);
c1_elem=c1_cell{1,1};
cordMatrix(:,i)=c1_elem;
end
% Sort the matrix by the third column-Y coordinates
% sortedMatrixByLy-sorted matrix by left y coordinates
sortedMatrixByLy=sortrows(cordMatrix, 3);
% sortedMatrixByRy-sorted matrix by right y coordinates
sortedMatrixByRy=sortrows(cordMatrix, 3);
%%
% pairwise distance between left and right side sets of points
% # of points on Left side and right side do NOT have to the the same
Left=sortedMatrixByLy(:,1:4);
Right=sortedMatrixByRy(:,5:8);
% Fetch the x,y,z coordinates of left side points
LC=Left(:,2:4);
% Fetch the x,y,z coordinates of right side points
RC=Right(:,2:4);
% Compute all the distances between points on left and right side
% i.e. left has M points, right has N points, size of D matrix is M*N
D = pdist2(LC,RC);
%%
% Find the minimum distance value in each row of D and
% return the corresponding indices
DD=D;
[Sml,ind] = min(DD,[],2);
for j=1:size(DD,1)
[Sml(j),ind(j)] = min(DD(j,:),[],2);
% Replace the value in the same column of ind(j) by a very large number
% eg.999999 in here to avoid duplicat indice (i.e. the same point on one
% side used more than once)
DD(:,ind(j))=999999;
end
% Based on the returned indices find the paired points on left and right
% sides which has minimum distances
% The paired nodes then can be incorporated into FEA package Abaqus input file to
% define Periodic Boundary Conditions by using "Equations" in Abaqus
% pn:parid nodes
pn=[Left(:,1) Right(ind,1)] I have generated a RVE. After meshing, i want to extract the nodes of the two opposite edges in MATLAB. I have use the code below, but it is giving blank.
clear;
fileID = fopen(‘new.txt’);
formatSpec = ‘%s’;
N = 8;
% reads file data, using the formatSpec N times
% c_h: cell header
c_h = textscan(fileID,formatSpec,N,’delimiter’,’|’);
% Read coordinates for nodes on the two opposite surfaces
% Save them in a cell array whose first and fourth columns are node #
% rest columns are x,y,z coordinates
% c_cord
c_cord = textscan(fileID,’%d %f %f %f %d %f %f %f’);
fclose(fileID);
%%
% Turn cell array which stored coordinates info. for points on left and
% right side of RVE into a sorted matrix
% Initialize matrix
cordMatrix=[];
for i=1:N
c1_cell=c_cord(1,i);
c1_elem=c1_cell{1,1};
cordMatrix(:,i)=c1_elem;
end
% Sort the matrix by the third column-Y coordinates
% sortedMatrixByLy-sorted matrix by left y coordinates
sortedMatrixByLy=sortrows(cordMatrix, 3);
% sortedMatrixByRy-sorted matrix by right y coordinates
sortedMatrixByRy=sortrows(cordMatrix, 3);
%%
% pairwise distance between left and right side sets of points
% # of points on Left side and right side do NOT have to the the same
Left=sortedMatrixByLy(:,1:4);
Right=sortedMatrixByRy(:,5:8);
% Fetch the x,y,z coordinates of left side points
LC=Left(:,2:4);
% Fetch the x,y,z coordinates of right side points
RC=Right(:,2:4);
% Compute all the distances between points on left and right side
% i.e. left has M points, right has N points, size of D matrix is M*N
D = pdist2(LC,RC);
%%
% Find the minimum distance value in each row of D and
% return the corresponding indices
DD=D;
[Sml,ind] = min(DD,[],2);
for j=1:size(DD,1)
[Sml(j),ind(j)] = min(DD(j,:),[],2);
% Replace the value in the same column of ind(j) by a very large number
% eg.999999 in here to avoid duplicat indice (i.e. the same point on one
% side used more than once)
DD(:,ind(j))=999999;
end
% Based on the returned indices find the paired points on left and right
% sides which has minimum distances
% The paired nodes then can be incorporated into FEA package Abaqus input file to
% define Periodic Boundary Conditions by using "Equations" in Abaqus
% pn:parid nodes
pn=[Left(:,1) Right(ind,1)] nodes, rve MATLAB Answers — New Questions
I put a breaker model in my circuit. And i found that it closes when the current is zero and the external signal is 0.
The circuit is a systhetic circuit usually used for circuit breaker. I add a half sine current on the breaker, and then put a very high voltage Oscillating voltage on it. The half sine current (20kA) meets zero at the 0.01s, and the extern signal for breaker is 0.009s, which means that it will open at the 0.01s. And it actually did. The Oscillating volatge source is added at 0.011s. However, when I reduce the half sine current to about 5kA, something magical happened. The breaker closes again and there is another current that flows through the breaker. And this problem still existed even when I changed the time stamp to put a very high voltage Oscillating voltage to 0.015s as I thought it needed enough time to open the breaker.
I really want to know why this happens and how to solve the problem that the breaker doesn’t opens as i think.
Here is the current that flows through breaker.
Here is my breaker configurations.The circuit is a systhetic circuit usually used for circuit breaker. I add a half sine current on the breaker, and then put a very high voltage Oscillating voltage on it. The half sine current (20kA) meets zero at the 0.01s, and the extern signal for breaker is 0.009s, which means that it will open at the 0.01s. And it actually did. The Oscillating volatge source is added at 0.011s. However, when I reduce the half sine current to about 5kA, something magical happened. The breaker closes again and there is another current that flows through the breaker. And this problem still existed even when I changed the time stamp to put a very high voltage Oscillating voltage to 0.015s as I thought it needed enough time to open the breaker.
I really want to know why this happens and how to solve the problem that the breaker doesn’t opens as i think.
Here is the current that flows through breaker.
Here is my breaker configurations. The circuit is a systhetic circuit usually used for circuit breaker. I add a half sine current on the breaker, and then put a very high voltage Oscillating voltage on it. The half sine current (20kA) meets zero at the 0.01s, and the extern signal for breaker is 0.009s, which means that it will open at the 0.01s. And it actually did. The Oscillating volatge source is added at 0.011s. However, when I reduce the half sine current to about 5kA, something magical happened. The breaker closes again and there is another current that flows through the breaker. And this problem still existed even when I changed the time stamp to put a very high voltage Oscillating voltage to 0.015s as I thought it needed enough time to open the breaker.
I really want to know why this happens and how to solve the problem that the breaker doesn’t opens as i think.
Here is the current that flows through breaker.
Here is my breaker configurations. breaker MATLAB Answers — New Questions
How to get shapley value for Neural Network trained on matlab? it keeps error…
Hi there,
I wanted to get shapley value of my pre-trained ANN.
it is regression model.
it’s input’s shape is 7*5120 double
and output is 1*5120 double.
I’m confused with idea of shapley.. sorryHi there,
I wanted to get shapley value of my pre-trained ANN.
it is regression model.
it’s input’s shape is 7*5120 double
and output is 1*5120 double.
I’m confused with idea of shapley.. sorry Hi there,
I wanted to get shapley value of my pre-trained ANN.
it is regression model.
it’s input’s shape is 7*5120 double
and output is 1*5120 double.
I’m confused with idea of shapley.. sorry shapley value, neural network MATLAB Answers — New Questions
How to normalise segregated surface emg signals into the same number of data points?
Hi everyone,
I have a cell array containing multiple gait cycles of an SEMG signal. Each cycle represents the push phase and recovery phase of a wheelchair. I want to get the average of the SEMG signal of all the cycles however, each cycle contains a different amount of data points. How do I normalise the cycles to contain a certain amount of data points without disrupting the signals? I also have a cell array containg the times of propulsion.
If anyone could point me in the right direction that would be great!
Thanks,Hi everyone,
I have a cell array containing multiple gait cycles of an SEMG signal. Each cycle represents the push phase and recovery phase of a wheelchair. I want to get the average of the SEMG signal of all the cycles however, each cycle contains a different amount of data points. How do I normalise the cycles to contain a certain amount of data points without disrupting the signals? I also have a cell array containg the times of propulsion.
If anyone could point me in the right direction that would be great!
Thanks, Hi everyone,
I have a cell array containing multiple gait cycles of an SEMG signal. Each cycle represents the push phase and recovery phase of a wheelchair. I want to get the average of the SEMG signal of all the cycles however, each cycle contains a different amount of data points. How do I normalise the cycles to contain a certain amount of data points without disrupting the signals? I also have a cell array containg the times of propulsion.
If anyone could point me in the right direction that would be great!
Thanks, signal processing, semg MATLAB Answers — New Questions
Plotting random number in a line
Hi Matlab Team,
I have X = rand(1,100), and I want to plot X such that points be in X axis. At the moment, when I use plot(X, ‘*’), we have index 1 to 100 on x-axis and X is in the vertical axis. This is not, what I want !!!
ThanksHi Matlab Team,
I have X = rand(1,100), and I want to plot X such that points be in X axis. At the moment, when I use plot(X, ‘*’), we have index 1 to 100 on x-axis and X is in the vertical axis. This is not, what I want !!!
Thanks Hi Matlab Team,
I have X = rand(1,100), and I want to plot X such that points be in X axis. At the moment, when I use plot(X, ‘*’), we have index 1 to 100 on x-axis and X is in the vertical axis. This is not, what I want !!!
Thanks plot, random number MATLAB Answers — New Questions
the question is on linear programming problems
A farm manufacturers three products P1, P2 and P3 using two machines M1 and M2. The product yield a contribution of sh.3 sh.2 and sh.4 respectively. Machine M1 and M2 have 2000 and 2500 machine hours respectively. There is an agreement with trading association to manufacture at least 100 units of P1, 200 units of P2 and 50 units of P3 but not more than 150 units of P1. The table below shows the processing time in hours for each machine on each product.
products
machines P1 P2 P3
M1 4 3 5
M2 2 2 4
required:
i. The production plan that maximizes contributionA farm manufacturers three products P1, P2 and P3 using two machines M1 and M2. The product yield a contribution of sh.3 sh.2 and sh.4 respectively. Machine M1 and M2 have 2000 and 2500 machine hours respectively. There is an agreement with trading association to manufacture at least 100 units of P1, 200 units of P2 and 50 units of P3 but not more than 150 units of P1. The table below shows the processing time in hours for each machine on each product.
products
machines P1 P2 P3
M1 4 3 5
M2 2 2 4
required:
i. The production plan that maximizes contribution A farm manufacturers three products P1, P2 and P3 using two machines M1 and M2. The product yield a contribution of sh.3 sh.2 and sh.4 respectively. Machine M1 and M2 have 2000 and 2500 machine hours respectively. There is an agreement with trading association to manufacture at least 100 units of P1, 200 units of P2 and 50 units of P3 but not more than 150 units of P1. The table below shows the processing time in hours for each machine on each product.
products
machines P1 P2 P3
M1 4 3 5
M2 2 2 4
required:
i. The production plan that maximizes contribution #operarions research MATLAB Answers — New Questions
Measuring average intensity of pixels for multiple images.
I am trying to read multiple similar images located in a folder and find the average intensity of pixels of the images. Following is the code I wrote initially which works fine:
Location = ‘D:\dummy location’;
B = dir(fullfile(sprintf(Location),sprintf(‘BLACK’), ‘*.tif’));
B_0 = numel(B);
for k = 1:B_0
F = fullfile(sprintf(Location),sprintf(‘BLACK’),B(k).name);
I{k} = imread(F);
end
B1 = cat(3,I{:});
black = mean(B1,3);
However, upon getting suggested to use vectorization to make the process faster, I wrote the following code:
Location = ‘D:\dummy location’;
B = dir(fullfile(sprintf(Location),sprintf(‘BLACK’), ‘*.tif’));
B_0 = numel(B);
k = 1:B_0;
F = fullfile(sprintf(Location),sprintf(‘BLACK’),B(k).name);
I{k} = imread(F);
B1 = cat(3,I{:});
black = mean(B1,3);
I am getting the following error:
Error using dir
Pathname ‘D:dummy locationBLACK1.tif10.tif100.tif101.tif102.tif103.tif104.tif105.tif106.tif107.tif108.tif109.tif11.tif110.tif111.tif112.tif113.tif114.tif115.tif116.tif117.tif118.tif119.tif12.tif120.tif121.tif122.tif123.tif124.tif125.tif126.tif127.tif128.tif129.tif13.tif130.tif131.tif132.tif133.tif134.tif135.tif136.tif137.tif138.tif139.tif14.tif140.tif141.tif142.tif143.tif144.tif145.tif146.tif147.tif148.tif149.tif15.tif150.tif151.tif152.tif153.tif154.tif155.tif156.tif157.tif158.tif159.tif16.tif160.tif161.tif162.tif163.tif164.tif165.tif166.tif167.tif168.tif169.tif17.tif170.tif171.tif172.tif173.tif174.tif175.tif176.tif177.tif178.tif179.tif18.tif180.tif181.tif182.tif183.tif184.tif185.tif186.tif187.tif188.tif189.tif19.tif190.tif191.tif192.tif193.tif194.tif195.tif196.tif197.tif198.tif199.tif2.tif20.tif200.tif201.tif202.tif203.tif204.tif205.tif206.tif207.tif208.tif209.tif21.tif210.tif211.tif212.tif213.tif214.tif215.tif216.tif217.tif218.tif219.tif22.tif220.tif221.tif222.tif223.tif224.tif225.tif226.tif227.tif228.tif229.tif23.tif230.tif231.tif232.tif233.tif234.tif235.tif236.tif237.tif238.tif239.tif24.tif240.tif241.tif242.tif243.tif244.tif245.tif246.tif247.tif248.tif249.tif25.tif250.tif251.tif252.tif253.tif254.tif255.tif256.tif257.tif258.tif259.tif26.tif260.tif261.tif262.tif263.tif264.tif265.tif266.tif267.tif268.tif269.tif27.tif270.tif271.tif272.tif273.tif274.tif275.tif276.tif277.tif278.tif279.tif28.tif280.tif281.tif282.tif283.tif284.tif285.tif286.tif287.tif288.tif289.tif29.tif290.tif291.tif292.tif293.tif294.tif295.tif296.tif297.tif298.tif299.tif3.tif30.tif300.tif301.tif302.tif303.tif304.tif305.tif306.tif307.tif308.tif309.tif31.tif310.tif311.tif312.tif313.tif314.tif315.tif316.tif317.tif318.tif319.tif32.tif320.tif321.tif322.tif323.tif324.tif325.tif326.tif327.tif328.tif329.tif33.tif330.tif331.tif332.tif333.tif334.tif335.tif336.tif337.tif338.tif339.tif34.tif340.tif341.tif342.tif343.tif344.tif345.tif346.tif347.tif348.tif349.tif35.tif350.tif351.tif352.tif353.tif354.tif355.tif356.tif357.tif358.tif359.tif36.tif360.tif361.tif362.tif363.tif364.tif365.tif366.tif367.tif368.tif369.tif37.tif370.tif371.tif372.tif373.tif374.tif375.tif376.tif377.tif378.tif379.tif38.tif380.tif381.tif382.tif383.tif384.tif385.tif386.tif387.tif388.tif389.tif39.tif390.tif391.tif392.tif393.tif394.tif395.tif396.tif397.tif398.tif399.tif4.tif40.tif400.tif401.tif402.tif403.tif404.tif405.tif406.tif407.tif408.tif409.tif41.tif410.tif411.tif412.tif413.tif414.tif415.tif416.tif417.tif418.tif419.tif42.tif420.tif421.tif422.tif423.tif424.tif425.tif426.tif427.tif428.tif429.tif43.tif430.tif431.tif432.tif433.tif434.tif435.tif436.tif437.tif438.tif439.tif44.tif440.tif441.tif442.tif443.tif444.tif445.tif446.tif447.tif448.tif449.tif45.tif450.tif451.tif452.tif453.tif454.tif455.tif456.tif457.tif458.tif459.tif46.tif460.tif461.tif462.tif463.tif464.tif465.tif466.tif467.tif468.tif469.tif47.tif470.tif471.tif472.tif473.tif474.tif475.tif476.tif477.tif478.tif479.tif48.tif480.tif481.tif482.tif483.tif484.tif485.tif486.tif487.tif488.tif489.tif49.tif490.tif491.tif492.tif493.tif494.tif495.tif496.tif497.tif498.tif499.tif5.tif50.tif500.tif51.tif52.tif53.tif54.tif55.tif56.tif57.tif58.tif59.tif6.tif60.tif61.tif62.tif63.tif64.tif65.tif66.tif67.tif68.tif69.tif7.tif70.tif71.tif72.tif73.tif74.tif75.tif76.tif77.tif78.tif79.tif8.tif80.tif81.tif82.tif83.tif84.tif85.tif86.tif87.tif88.tif89.tif9.tif90.tif91.tif92.tif93.tif94.tif95.tif96.tif97.tif98.tif99.tif’
is too long.
Error in imread>get_full_filename (line 560)
if ~isempty(dir(filename))
Error in imread (line 371)
fullname = get_full_filename(filename);
Error in avg_new (line 12)
I{k} = imread(F);
Can anyone please help me correcting this error to get the same result as my first code?I am trying to read multiple similar images located in a folder and find the average intensity of pixels of the images. Following is the code I wrote initially which works fine:
Location = ‘D:\dummy location’;
B = dir(fullfile(sprintf(Location),sprintf(‘BLACK’), ‘*.tif’));
B_0 = numel(B);
for k = 1:B_0
F = fullfile(sprintf(Location),sprintf(‘BLACK’),B(k).name);
I{k} = imread(F);
end
B1 = cat(3,I{:});
black = mean(B1,3);
However, upon getting suggested to use vectorization to make the process faster, I wrote the following code:
Location = ‘D:\dummy location’;
B = dir(fullfile(sprintf(Location),sprintf(‘BLACK’), ‘*.tif’));
B_0 = numel(B);
k = 1:B_0;
F = fullfile(sprintf(Location),sprintf(‘BLACK’),B(k).name);
I{k} = imread(F);
B1 = cat(3,I{:});
black = mean(B1,3);
I am getting the following error:
Error using dir
Pathname ‘D:dummy locationBLACK1.tif10.tif100.tif101.tif102.tif103.tif104.tif105.tif106.tif107.tif108.tif109.tif11.tif110.tif111.tif112.tif113.tif114.tif115.tif116.tif117.tif118.tif119.tif12.tif120.tif121.tif122.tif123.tif124.tif125.tif126.tif127.tif128.tif129.tif13.tif130.tif131.tif132.tif133.tif134.tif135.tif136.tif137.tif138.tif139.tif14.tif140.tif141.tif142.tif143.tif144.tif145.tif146.tif147.tif148.tif149.tif15.tif150.tif151.tif152.tif153.tif154.tif155.tif156.tif157.tif158.tif159.tif16.tif160.tif161.tif162.tif163.tif164.tif165.tif166.tif167.tif168.tif169.tif17.tif170.tif171.tif172.tif173.tif174.tif175.tif176.tif177.tif178.tif179.tif18.tif180.tif181.tif182.tif183.tif184.tif185.tif186.tif187.tif188.tif189.tif19.tif190.tif191.tif192.tif193.tif194.tif195.tif196.tif197.tif198.tif199.tif2.tif20.tif200.tif201.tif202.tif203.tif204.tif205.tif206.tif207.tif208.tif209.tif21.tif210.tif211.tif212.tif213.tif214.tif215.tif216.tif217.tif218.tif219.tif22.tif220.tif221.tif222.tif223.tif224.tif225.tif226.tif227.tif228.tif229.tif23.tif230.tif231.tif232.tif233.tif234.tif235.tif236.tif237.tif238.tif239.tif24.tif240.tif241.tif242.tif243.tif244.tif245.tif246.tif247.tif248.tif249.tif25.tif250.tif251.tif252.tif253.tif254.tif255.tif256.tif257.tif258.tif259.tif26.tif260.tif261.tif262.tif263.tif264.tif265.tif266.tif267.tif268.tif269.tif27.tif270.tif271.tif272.tif273.tif274.tif275.tif276.tif277.tif278.tif279.tif28.tif280.tif281.tif282.tif283.tif284.tif285.tif286.tif287.tif288.tif289.tif29.tif290.tif291.tif292.tif293.tif294.tif295.tif296.tif297.tif298.tif299.tif3.tif30.tif300.tif301.tif302.tif303.tif304.tif305.tif306.tif307.tif308.tif309.tif31.tif310.tif311.tif312.tif313.tif314.tif315.tif316.tif317.tif318.tif319.tif32.tif320.tif321.tif322.tif323.tif324.tif325.tif326.tif327.tif328.tif329.tif33.tif330.tif331.tif332.tif333.tif334.tif335.tif336.tif337.tif338.tif339.tif34.tif340.tif341.tif342.tif343.tif344.tif345.tif346.tif347.tif348.tif349.tif35.tif350.tif351.tif352.tif353.tif354.tif355.tif356.tif357.tif358.tif359.tif36.tif360.tif361.tif362.tif363.tif364.tif365.tif366.tif367.tif368.tif369.tif37.tif370.tif371.tif372.tif373.tif374.tif375.tif376.tif377.tif378.tif379.tif38.tif380.tif381.tif382.tif383.tif384.tif385.tif386.tif387.tif388.tif389.tif39.tif390.tif391.tif392.tif393.tif394.tif395.tif396.tif397.tif398.tif399.tif4.tif40.tif400.tif401.tif402.tif403.tif404.tif405.tif406.tif407.tif408.tif409.tif41.tif410.tif411.tif412.tif413.tif414.tif415.tif416.tif417.tif418.tif419.tif42.tif420.tif421.tif422.tif423.tif424.tif425.tif426.tif427.tif428.tif429.tif43.tif430.tif431.tif432.tif433.tif434.tif435.tif436.tif437.tif438.tif439.tif44.tif440.tif441.tif442.tif443.tif444.tif445.tif446.tif447.tif448.tif449.tif45.tif450.tif451.tif452.tif453.tif454.tif455.tif456.tif457.tif458.tif459.tif46.tif460.tif461.tif462.tif463.tif464.tif465.tif466.tif467.tif468.tif469.tif47.tif470.tif471.tif472.tif473.tif474.tif475.tif476.tif477.tif478.tif479.tif48.tif480.tif481.tif482.tif483.tif484.tif485.tif486.tif487.tif488.tif489.tif49.tif490.tif491.tif492.tif493.tif494.tif495.tif496.tif497.tif498.tif499.tif5.tif50.tif500.tif51.tif52.tif53.tif54.tif55.tif56.tif57.tif58.tif59.tif6.tif60.tif61.tif62.tif63.tif64.tif65.tif66.tif67.tif68.tif69.tif7.tif70.tif71.tif72.tif73.tif74.tif75.tif76.tif77.tif78.tif79.tif8.tif80.tif81.tif82.tif83.tif84.tif85.tif86.tif87.tif88.tif89.tif9.tif90.tif91.tif92.tif93.tif94.tif95.tif96.tif97.tif98.tif99.tif’
is too long.
Error in imread>get_full_filename (line 560)
if ~isempty(dir(filename))
Error in imread (line 371)
fullname = get_full_filename(filename);
Error in avg_new (line 12)
I{k} = imread(F);
Can anyone please help me correcting this error to get the same result as my first code? I am trying to read multiple similar images located in a folder and find the average intensity of pixels of the images. Following is the code I wrote initially which works fine:
Location = ‘D:\dummy location’;
B = dir(fullfile(sprintf(Location),sprintf(‘BLACK’), ‘*.tif’));
B_0 = numel(B);
for k = 1:B_0
F = fullfile(sprintf(Location),sprintf(‘BLACK’),B(k).name);
I{k} = imread(F);
end
B1 = cat(3,I{:});
black = mean(B1,3);
However, upon getting suggested to use vectorization to make the process faster, I wrote the following code:
Location = ‘D:\dummy location’;
B = dir(fullfile(sprintf(Location),sprintf(‘BLACK’), ‘*.tif’));
B_0 = numel(B);
k = 1:B_0;
F = fullfile(sprintf(Location),sprintf(‘BLACK’),B(k).name);
I{k} = imread(F);
B1 = cat(3,I{:});
black = mean(B1,3);
I am getting the following error:
Error using dir
Pathname ‘D:dummy locationBLACK1.tif10.tif100.tif101.tif102.tif103.tif104.tif105.tif106.tif107.tif108.tif109.tif11.tif110.tif111.tif112.tif113.tif114.tif115.tif116.tif117.tif118.tif119.tif12.tif120.tif121.tif122.tif123.tif124.tif125.tif126.tif127.tif128.tif129.tif13.tif130.tif131.tif132.tif133.tif134.tif135.tif136.tif137.tif138.tif139.tif14.tif140.tif141.tif142.tif143.tif144.tif145.tif146.tif147.tif148.tif149.tif15.tif150.tif151.tif152.tif153.tif154.tif155.tif156.tif157.tif158.tif159.tif16.tif160.tif161.tif162.tif163.tif164.tif165.tif166.tif167.tif168.tif169.tif17.tif170.tif171.tif172.tif173.tif174.tif175.tif176.tif177.tif178.tif179.tif18.tif180.tif181.tif182.tif183.tif184.tif185.tif186.tif187.tif188.tif189.tif19.tif190.tif191.tif192.tif193.tif194.tif195.tif196.tif197.tif198.tif199.tif2.tif20.tif200.tif201.tif202.tif203.tif204.tif205.tif206.tif207.tif208.tif209.tif21.tif210.tif211.tif212.tif213.tif214.tif215.tif216.tif217.tif218.tif219.tif22.tif220.tif221.tif222.tif223.tif224.tif225.tif226.tif227.tif228.tif229.tif23.tif230.tif231.tif232.tif233.tif234.tif235.tif236.tif237.tif238.tif239.tif24.tif240.tif241.tif242.tif243.tif244.tif245.tif246.tif247.tif248.tif249.tif25.tif250.tif251.tif252.tif253.tif254.tif255.tif256.tif257.tif258.tif259.tif26.tif260.tif261.tif262.tif263.tif264.tif265.tif266.tif267.tif268.tif269.tif27.tif270.tif271.tif272.tif273.tif274.tif275.tif276.tif277.tif278.tif279.tif28.tif280.tif281.tif282.tif283.tif284.tif285.tif286.tif287.tif288.tif289.tif29.tif290.tif291.tif292.tif293.tif294.tif295.tif296.tif297.tif298.tif299.tif3.tif30.tif300.tif301.tif302.tif303.tif304.tif305.tif306.tif307.tif308.tif309.tif31.tif310.tif311.tif312.tif313.tif314.tif315.tif316.tif317.tif318.tif319.tif32.tif320.tif321.tif322.tif323.tif324.tif325.tif326.tif327.tif328.tif329.tif33.tif330.tif331.tif332.tif333.tif334.tif335.tif336.tif337.tif338.tif339.tif34.tif340.tif341.tif342.tif343.tif344.tif345.tif346.tif347.tif348.tif349.tif35.tif350.tif351.tif352.tif353.tif354.tif355.tif356.tif357.tif358.tif359.tif36.tif360.tif361.tif362.tif363.tif364.tif365.tif366.tif367.tif368.tif369.tif37.tif370.tif371.tif372.tif373.tif374.tif375.tif376.tif377.tif378.tif379.tif38.tif380.tif381.tif382.tif383.tif384.tif385.tif386.tif387.tif388.tif389.tif39.tif390.tif391.tif392.tif393.tif394.tif395.tif396.tif397.tif398.tif399.tif4.tif40.tif400.tif401.tif402.tif403.tif404.tif405.tif406.tif407.tif408.tif409.tif41.tif410.tif411.tif412.tif413.tif414.tif415.tif416.tif417.tif418.tif419.tif42.tif420.tif421.tif422.tif423.tif424.tif425.tif426.tif427.tif428.tif429.tif43.tif430.tif431.tif432.tif433.tif434.tif435.tif436.tif437.tif438.tif439.tif44.tif440.tif441.tif442.tif443.tif444.tif445.tif446.tif447.tif448.tif449.tif45.tif450.tif451.tif452.tif453.tif454.tif455.tif456.tif457.tif458.tif459.tif46.tif460.tif461.tif462.tif463.tif464.tif465.tif466.tif467.tif468.tif469.tif47.tif470.tif471.tif472.tif473.tif474.tif475.tif476.tif477.tif478.tif479.tif48.tif480.tif481.tif482.tif483.tif484.tif485.tif486.tif487.tif488.tif489.tif49.tif490.tif491.tif492.tif493.tif494.tif495.tif496.tif497.tif498.tif499.tif5.tif50.tif500.tif51.tif52.tif53.tif54.tif55.tif56.tif57.tif58.tif59.tif6.tif60.tif61.tif62.tif63.tif64.tif65.tif66.tif67.tif68.tif69.tif7.tif70.tif71.tif72.tif73.tif74.tif75.tif76.tif77.tif78.tif79.tif8.tif80.tif81.tif82.tif83.tif84.tif85.tif86.tif87.tif88.tif89.tif9.tif90.tif91.tif92.tif93.tif94.tif95.tif96.tif97.tif98.tif99.tif’
is too long.
Error in imread>get_full_filename (line 560)
if ~isempty(dir(filename))
Error in imread (line 371)
fullname = get_full_filename(filename);
Error in avg_new (line 12)
I{k} = imread(F);
Can anyone please help me correcting this error to get the same result as my first code? vectorization, image analysis, image processing MATLAB Answers — New Questions
How to interpret Anomaly Scores for One Class Support Vector Machines
I am using One Class Support Vector Machines for anomaly detection. Here is the anomaly scores histogram (attached) for the model trained with 274 samples and tested with 31 samples. How do I determine the true/false prediction rates from the anomaly scores histogram.
Thank YouI am using One Class Support Vector Machines for anomaly detection. Here is the anomaly scores histogram (attached) for the model trained with 274 samples and tested with 31 samples. How do I determine the true/false prediction rates from the anomaly scores histogram.
Thank You I am using One Class Support Vector Machines for anomaly detection. Here is the anomaly scores histogram (attached) for the model trained with 274 samples and tested with 31 samples. How do I determine the true/false prediction rates from the anomaly scores histogram.
Thank You anomaly, one class svm, scores MATLAB Answers — New Questions
How do I fix this error?
deltat=0.1;
nsamples=2^10;
fs=1/deltat;
time=[0 : deltat : deltat*(nsamples-1)];
psdtot(1:nsamples/2+1) = zeros(1,nsamples/2+1);
nblock = 10;
for k=1:nblock
for i=1: nsamples
ydata(i,:) =5+10*cos(2*pi*time+pi/6)+15* randn(1);
end
[pxx,f] = periodogram(ydata,rectwin(nsamples),nsamples,fs);
size(psdtot)
size(pxx)
psdtot = psdtot + pxx/nblock;
end
figure(1);
plot(time,ydata);
I’m trying to generate Gaussian noise from x(t)=5+10*cos(2*pi*t+pi/6)+G(sigma,t)
G(sigma,t) is Gaussian noise with a standard deviation of 15 (sigma G=15), detat=0.1(s), and nsample=2^10.
It is the start of calculating Power Spectral Density with FFT.
The overall variance of the signal is (sigma g)^2+(A)^2/2 as expected.
The generated random signal should be sinusoidal because X(t) has the cosine factor.deltat=0.1;
nsamples=2^10;
fs=1/deltat;
time=[0 : deltat : deltat*(nsamples-1)];
psdtot(1:nsamples/2+1) = zeros(1,nsamples/2+1);
nblock = 10;
for k=1:nblock
for i=1: nsamples
ydata(i,:) =5+10*cos(2*pi*time+pi/6)+15* randn(1);
end
[pxx,f] = periodogram(ydata,rectwin(nsamples),nsamples,fs);
size(psdtot)
size(pxx)
psdtot = psdtot + pxx/nblock;
end
figure(1);
plot(time,ydata);
I’m trying to generate Gaussian noise from x(t)=5+10*cos(2*pi*t+pi/6)+G(sigma,t)
G(sigma,t) is Gaussian noise with a standard deviation of 15 (sigma G=15), detat=0.1(s), and nsample=2^10.
It is the start of calculating Power Spectral Density with FFT.
The overall variance of the signal is (sigma g)^2+(A)^2/2 as expected.
The generated random signal should be sinusoidal because X(t) has the cosine factor. deltat=0.1;
nsamples=2^10;
fs=1/deltat;
time=[0 : deltat : deltat*(nsamples-1)];
psdtot(1:nsamples/2+1) = zeros(1,nsamples/2+1);
nblock = 10;
for k=1:nblock
for i=1: nsamples
ydata(i,:) =5+10*cos(2*pi*time+pi/6)+15* randn(1);
end
[pxx,f] = periodogram(ydata,rectwin(nsamples),nsamples,fs);
size(psdtot)
size(pxx)
psdtot = psdtot + pxx/nblock;
end
figure(1);
plot(time,ydata);
I’m trying to generate Gaussian noise from x(t)=5+10*cos(2*pi*t+pi/6)+G(sigma,t)
G(sigma,t) is Gaussian noise with a standard deviation of 15 (sigma G=15), detat=0.1(s), and nsample=2^10.
It is the start of calculating Power Spectral Density with FFT.
The overall variance of the signal is (sigma g)^2+(A)^2/2 as expected.
The generated random signal should be sinusoidal because X(t) has the cosine factor. predefine the array MATLAB Answers — New Questions
Thermal Image analysis on legs
I am trying to edit the below code so that it gives me an image of the area selected that is above the average temperature of the lower limb.
I would be grateful for any tips
clc;
close all;
clear;
workspace;
format long g;
format compact;
% Read the thermal image
thermalImage = imread(‘thermal_image_side_leg_2 .jpeg’); % Replace ‘thermal_image.jpg’ with the filename of your thermal image
% Display the thermal image
figure;
imshow(thermalImage);
title(‘Original Thermal Image’);
% Convert the thermal image to grayscale
thermalImageGray = rgb2gray(thermalImage);
% Display the grayscale thermal image
figure;
imshow(thermalImageGray);
title(‘Grayscale Thermal Image’);
% Select the area of interest using the imfreehand function
figure;
imshow(thermalImageGray);
title(‘Select Area of Interest’);
roi = imfreehand; % This allows you to draw a freehand region of interest (ROI) on the grayscale thermal image
binaryMask = createMask(roi);
% Apply the binary mask to the grayscale image
maskedGrayImage = thermalImageGray .* uint8(binaryMask);
% Display the masked grayscale image
figure;
imshow(maskedGrayImage);
title(‘Masked Grayscale Image’);
% Define the temperature scale using the color bar
colorBarImage = imread(‘Color_bar_side_leg_2.png’); % Replace ‘colorbar_image.jpg’ with the filename of your color bar image
temperatureRange = [26, 38]; % Replace with the temperature range provided by the color bar
% Calibrate the masked grayscale image using the temperature range
calibratedImage = (double(maskedGrayImage) – double(min(thermalImageGray(:)))) * (temperatureRange(2) – temperatureRange(1)) / (double(max(thermalImageGray(:))) – double(min(thermalImageGray(:)))) + temperatureRange(1);
% Display the calibrated image
figure;
imshow(calibratedImage);
title(‘Calibrated Image’);
% Calculate the average temperature of the ROI
averageTemperature = mean(calibratedImage(binaryMask));
% Display the average temperature
disp([‘The average temperature of the selected area is: ‘, num2str(averageTemperature), ‘ °C’]);
% Calculate the average temperature of the ROI
averageTemperature = mean(calibratedImage(binaryMask));
% Display the average temperature
disp([‘The average temperature of the selected area is: ‘, num2str(averageTemperature), ‘ °C’]);
% Threshold the calibrated image to create a binary mask for temperatures above the average
binaryAboveAverage = calibratedImage > averageTemperature;
% Display the binary mask
figure;
imshow(binaryAboveAverage);
title(‘Areas above Average Temperature’);
% Apply the binary mask to the original image
thresholdedImage = thermalImage;
thresholdedImage(repmat(~binaryAboveAverage, [1, 1, 3])) = 0;
% Display the thresholded image
figure;
imshow(thresholdedImage);
title(‘Thresholded Image’);I am trying to edit the below code so that it gives me an image of the area selected that is above the average temperature of the lower limb.
I would be grateful for any tips
clc;
close all;
clear;
workspace;
format long g;
format compact;
% Read the thermal image
thermalImage = imread(‘thermal_image_side_leg_2 .jpeg’); % Replace ‘thermal_image.jpg’ with the filename of your thermal image
% Display the thermal image
figure;
imshow(thermalImage);
title(‘Original Thermal Image’);
% Convert the thermal image to grayscale
thermalImageGray = rgb2gray(thermalImage);
% Display the grayscale thermal image
figure;
imshow(thermalImageGray);
title(‘Grayscale Thermal Image’);
% Select the area of interest using the imfreehand function
figure;
imshow(thermalImageGray);
title(‘Select Area of Interest’);
roi = imfreehand; % This allows you to draw a freehand region of interest (ROI) on the grayscale thermal image
binaryMask = createMask(roi);
% Apply the binary mask to the grayscale image
maskedGrayImage = thermalImageGray .* uint8(binaryMask);
% Display the masked grayscale image
figure;
imshow(maskedGrayImage);
title(‘Masked Grayscale Image’);
% Define the temperature scale using the color bar
colorBarImage = imread(‘Color_bar_side_leg_2.png’); % Replace ‘colorbar_image.jpg’ with the filename of your color bar image
temperatureRange = [26, 38]; % Replace with the temperature range provided by the color bar
% Calibrate the masked grayscale image using the temperature range
calibratedImage = (double(maskedGrayImage) – double(min(thermalImageGray(:)))) * (temperatureRange(2) – temperatureRange(1)) / (double(max(thermalImageGray(:))) – double(min(thermalImageGray(:)))) + temperatureRange(1);
% Display the calibrated image
figure;
imshow(calibratedImage);
title(‘Calibrated Image’);
% Calculate the average temperature of the ROI
averageTemperature = mean(calibratedImage(binaryMask));
% Display the average temperature
disp([‘The average temperature of the selected area is: ‘, num2str(averageTemperature), ‘ °C’]);
% Calculate the average temperature of the ROI
averageTemperature = mean(calibratedImage(binaryMask));
% Display the average temperature
disp([‘The average temperature of the selected area is: ‘, num2str(averageTemperature), ‘ °C’]);
% Threshold the calibrated image to create a binary mask for temperatures above the average
binaryAboveAverage = calibratedImage > averageTemperature;
% Display the binary mask
figure;
imshow(binaryAboveAverage);
title(‘Areas above Average Temperature’);
% Apply the binary mask to the original image
thresholdedImage = thermalImage;
thresholdedImage(repmat(~binaryAboveAverage, [1, 1, 3])) = 0;
% Display the thresholded image
figure;
imshow(thresholdedImage);
title(‘Thresholded Image’); I am trying to edit the below code so that it gives me an image of the area selected that is above the average temperature of the lower limb.
I would be grateful for any tips
clc;
close all;
clear;
workspace;
format long g;
format compact;
% Read the thermal image
thermalImage = imread(‘thermal_image_side_leg_2 .jpeg’); % Replace ‘thermal_image.jpg’ with the filename of your thermal image
% Display the thermal image
figure;
imshow(thermalImage);
title(‘Original Thermal Image’);
% Convert the thermal image to grayscale
thermalImageGray = rgb2gray(thermalImage);
% Display the grayscale thermal image
figure;
imshow(thermalImageGray);
title(‘Grayscale Thermal Image’);
% Select the area of interest using the imfreehand function
figure;
imshow(thermalImageGray);
title(‘Select Area of Interest’);
roi = imfreehand; % This allows you to draw a freehand region of interest (ROI) on the grayscale thermal image
binaryMask = createMask(roi);
% Apply the binary mask to the grayscale image
maskedGrayImage = thermalImageGray .* uint8(binaryMask);
% Display the masked grayscale image
figure;
imshow(maskedGrayImage);
title(‘Masked Grayscale Image’);
% Define the temperature scale using the color bar
colorBarImage = imread(‘Color_bar_side_leg_2.png’); % Replace ‘colorbar_image.jpg’ with the filename of your color bar image
temperatureRange = [26, 38]; % Replace with the temperature range provided by the color bar
% Calibrate the masked grayscale image using the temperature range
calibratedImage = (double(maskedGrayImage) – double(min(thermalImageGray(:)))) * (temperatureRange(2) – temperatureRange(1)) / (double(max(thermalImageGray(:))) – double(min(thermalImageGray(:)))) + temperatureRange(1);
% Display the calibrated image
figure;
imshow(calibratedImage);
title(‘Calibrated Image’);
% Calculate the average temperature of the ROI
averageTemperature = mean(calibratedImage(binaryMask));
% Display the average temperature
disp([‘The average temperature of the selected area is: ‘, num2str(averageTemperature), ‘ °C’]);
% Calculate the average temperature of the ROI
averageTemperature = mean(calibratedImage(binaryMask));
% Display the average temperature
disp([‘The average temperature of the selected area is: ‘, num2str(averageTemperature), ‘ °C’]);
% Threshold the calibrated image to create a binary mask for temperatures above the average
binaryAboveAverage = calibratedImage > averageTemperature;
% Display the binary mask
figure;
imshow(binaryAboveAverage);
title(‘Areas above Average Temperature’);
% Apply the binary mask to the original image
thresholdedImage = thermalImage;
thresholdedImage(repmat(~binaryAboveAverage, [1, 1, 3])) = 0;
% Display the thresholded image
figure;
imshow(thresholdedImage);
title(‘Thresholded Image’); thermal image MATLAB Answers — New Questions
Deep learning: predict and forward give very inconsistent result with batch normalisation
Hi there,
I have a dnn with BatchNormalization layers. I did [Uf, statef] = forward(dnn_net, XT); "statef" returned from forward call should contain the learned mean and variance of the BN layers. I then update the dnn_net.State = statef so that the dnn_net.State is updated with the learned mean and var from the forward call. Then I did Up = predict(dnn_net,XT) [on the same data XT as the forward call]. Then I compare the mse(Up,Uf) and it turns out to be quite large (e.g 2.xx). This is totally not expected. Please help
I have created a simple test script to show the problem below:
numLayer = 9;
numNeurons = 80;
layers = featureInputLayer(2);% 2 input features
for i = 1:numLayer-1
layers = [
layers
fullyConnectedLayer(numNeurons)
batchNormalizationLayer
geluLayer
];
end
layers = [
layers
fullyConnectedLayer(4)];
dnn_net = dlnetwork(layers,’Initialize’,true);
dnn_net = expandLayers(dnn_net);% expand the layers in residual blocks
dnn_net = dlupdate(@double,dnn_net);
X = 2*pi*dlarray(randn(1,1000),"CB");
T = 2*pi*dlarray(randn(1,1000),"CB");
XT = cat(1,X,T);
% compute DNN output using forward function, statef contains
% batchnormlayers (learned means and learned var)
[Uf,statef] = forward(dnn_net,XT);
dnn_net.State = statef;% update the dnn_net.State (so that it has the BN layers updated learned means and var
Up = predict(dnn_net,XT);
% DNN output between predict call and forward call shoudl be the same in
% this case (becausae the dnn_net.State is updated with the same learned mean/var from forward calls.
% However, it is not the case. The err is quite large
plot(Uf(1,:),’r-‘);hold on; plot(Up(1,:),’b-‘);
err = mse(Uf(1,:),Up(1,:))Hi there,
I have a dnn with BatchNormalization layers. I did [Uf, statef] = forward(dnn_net, XT); "statef" returned from forward call should contain the learned mean and variance of the BN layers. I then update the dnn_net.State = statef so that the dnn_net.State is updated with the learned mean and var from the forward call. Then I did Up = predict(dnn_net,XT) [on the same data XT as the forward call]. Then I compare the mse(Up,Uf) and it turns out to be quite large (e.g 2.xx). This is totally not expected. Please help
I have created a simple test script to show the problem below:
numLayer = 9;
numNeurons = 80;
layers = featureInputLayer(2);% 2 input features
for i = 1:numLayer-1
layers = [
layers
fullyConnectedLayer(numNeurons)
batchNormalizationLayer
geluLayer
];
end
layers = [
layers
fullyConnectedLayer(4)];
dnn_net = dlnetwork(layers,’Initialize’,true);
dnn_net = expandLayers(dnn_net);% expand the layers in residual blocks
dnn_net = dlupdate(@double,dnn_net);
X = 2*pi*dlarray(randn(1,1000),"CB");
T = 2*pi*dlarray(randn(1,1000),"CB");
XT = cat(1,X,T);
% compute DNN output using forward function, statef contains
% batchnormlayers (learned means and learned var)
[Uf,statef] = forward(dnn_net,XT);
dnn_net.State = statef;% update the dnn_net.State (so that it has the BN layers updated learned means and var
Up = predict(dnn_net,XT);
% DNN output between predict call and forward call shoudl be the same in
% this case (becausae the dnn_net.State is updated with the same learned mean/var from forward calls.
% However, it is not the case. The err is quite large
plot(Uf(1,:),’r-‘);hold on; plot(Up(1,:),’b-‘);
err = mse(Uf(1,:),Up(1,:)) Hi there,
I have a dnn with BatchNormalization layers. I did [Uf, statef] = forward(dnn_net, XT); "statef" returned from forward call should contain the learned mean and variance of the BN layers. I then update the dnn_net.State = statef so that the dnn_net.State is updated with the learned mean and var from the forward call. Then I did Up = predict(dnn_net,XT) [on the same data XT as the forward call]. Then I compare the mse(Up,Uf) and it turns out to be quite large (e.g 2.xx). This is totally not expected. Please help
I have created a simple test script to show the problem below:
numLayer = 9;
numNeurons = 80;
layers = featureInputLayer(2);% 2 input features
for i = 1:numLayer-1
layers = [
layers
fullyConnectedLayer(numNeurons)
batchNormalizationLayer
geluLayer
];
end
layers = [
layers
fullyConnectedLayer(4)];
dnn_net = dlnetwork(layers,’Initialize’,true);
dnn_net = expandLayers(dnn_net);% expand the layers in residual blocks
dnn_net = dlupdate(@double,dnn_net);
X = 2*pi*dlarray(randn(1,1000),"CB");
T = 2*pi*dlarray(randn(1,1000),"CB");
XT = cat(1,X,T);
% compute DNN output using forward function, statef contains
% batchnormlayers (learned means and learned var)
[Uf,statef] = forward(dnn_net,XT);
dnn_net.State = statef;% update the dnn_net.State (so that it has the BN layers updated learned means and var
Up = predict(dnn_net,XT);
% DNN output between predict call and forward call shoudl be the same in
% this case (becausae the dnn_net.State is updated with the same learned mean/var from forward calls.
% However, it is not the case. The err is quite large
plot(Uf(1,:),’r-‘);hold on; plot(Up(1,:),’b-‘);
err = mse(Uf(1,:),Up(1,:)) predict and forward gives inconsistent outputs MATLAB Answers — New Questions
how to save variable data that we changed ?
this is my code:
nSamp = 3251;
Fs = 1024e3;
SNR = 40;
rng default
t = (0:nSamp-1)’/Fs;
x = sin(2*pi*t*100.123e3);
x = x + randn(size(x))*std(x)/db2mag(SNR);
[Pxx,f] = periodogram(x,kaiser(nSamp,38),[],Fs);
meanfreq(Pxx,f);
i change the variable in this code to my dataset . then after run, the variable go to its original data . how to solve this problem?this is my code:
nSamp = 3251;
Fs = 1024e3;
SNR = 40;
rng default
t = (0:nSamp-1)’/Fs;
x = sin(2*pi*t*100.123e3);
x = x + randn(size(x))*std(x)/db2mag(SNR);
[Pxx,f] = periodogram(x,kaiser(nSamp,38),[],Fs);
meanfreq(Pxx,f);
i change the variable in this code to my dataset . then after run, the variable go to its original data . how to solve this problem? this is my code:
nSamp = 3251;
Fs = 1024e3;
SNR = 40;
rng default
t = (0:nSamp-1)’/Fs;
x = sin(2*pi*t*100.123e3);
x = x + randn(size(x))*std(x)/db2mag(SNR);
[Pxx,f] = periodogram(x,kaiser(nSamp,38),[],Fs);
meanfreq(Pxx,f);
i change the variable in this code to my dataset . then after run, the variable go to its original data . how to solve this problem? change and save variables MATLAB Answers — New Questions
Estimation of average angles based on quadrants
Hello, I would appreaciate any suggestion to estimate the total average of angles based on the location of the quadrants. The length of the matrix of the angles to assess the average is variable and for these examples I am assuming that the length of the matrices are constant:
angles=[2;355;0;6]
I should have the following answer for the average:
average_angle=0.75;
% Another case:
angles=[-2;350;0;-3 ]
average=356.25;
% another case
angles=[5;36;45;-5]
average=110.25
% another case
angles=[35;36;45;50]
average=41.5
% another case
angles=[180;150;-8;130]
average=203
I would appreciate the help if there is a quick command in Matlab to do these operations without having too many conditions.Hello, I would appreaciate any suggestion to estimate the total average of angles based on the location of the quadrants. The length of the matrix of the angles to assess the average is variable and for these examples I am assuming that the length of the matrices are constant:
angles=[2;355;0;6]
I should have the following answer for the average:
average_angle=0.75;
% Another case:
angles=[-2;350;0;-3 ]
average=356.25;
% another case
angles=[5;36;45;-5]
average=110.25
% another case
angles=[35;36;45;50]
average=41.5
% another case
angles=[180;150;-8;130]
average=203
I would appreciate the help if there is a quick command in Matlab to do these operations without having too many conditions. Hello, I would appreaciate any suggestion to estimate the total average of angles based on the location of the quadrants. The length of the matrix of the angles to assess the average is variable and for these examples I am assuming that the length of the matrices are constant:
angles=[2;355;0;6]
I should have the following answer for the average:
average_angle=0.75;
% Another case:
angles=[-2;350;0;-3 ]
average=356.25;
% another case
angles=[5;36;45;-5]
average=110.25
% another case
angles=[35;36;45;50]
average=41.5
% another case
angles=[180;150;-8;130]
average=203
I would appreciate the help if there is a quick command in Matlab to do these operations without having too many conditions. average estimation of angles bases on quadrants MATLAB Answers — New Questions
How to make convergence criteria for Levenberg-Marquardt algorithm
How to make convergence criteria for Levenberg-Marquardt algorithm, please give practical hint for matlab implementatioHow to make convergence criteria for Levenberg-Marquardt algorithm, please give practical hint for matlab implementatio How to make convergence criteria for Levenberg-Marquardt algorithm, please give practical hint for matlab implementatio levenberg-marquardt, convergence MATLAB Answers — New Questions
Inertia axes in an image
I have to evaluate the symmetry of this nevus, you can see his binary image.
I have found the centroid, would you give me an advise for the code to find and show the inertia axis of the image which match each other in the centroid?
I would have to align them with x and y axis of the image with a rotation then.
Thank youI have to evaluate the symmetry of this nevus, you can see his binary image.
I have found the centroid, would you give me an advise for the code to find and show the inertia axis of the image which match each other in the centroid?
I would have to align them with x and y axis of the image with a rotation then.
Thank you I have to evaluate the symmetry of this nevus, you can see his binary image.
I have found the centroid, would you give me an advise for the code to find and show the inertia axis of the image which match each other in the centroid?
I would have to align them with x and y axis of the image with a rotation then.
Thank you inertia, axis MATLAB Answers — New Questions
matlab r2014a에서 ‘gwr’은(는) 유형 ‘struct’의 입력 인수에 대해 정의되지 않은 함수입니다.
matlab r2014a에서 ‘gwr’은(는) 유형 ‘struct’의 입력 인수에 대해 정의되지 않은 함수입니다.
라고 경고문이 뜨는데 , gwr을 하기 위해서는 어떻게 해야하나요?
%=============GWR ANALYSIS========%
%=============exponential weight========%
info.dtype=’exponential’;
res1=gwr(ln_sale,x,xc,yc,info);
prt(res1, vnames);
more on;matlab r2014a에서 ‘gwr’은(는) 유형 ‘struct’의 입력 인수에 대해 정의되지 않은 함수입니다.
라고 경고문이 뜨는데 , gwr을 하기 위해서는 어떻게 해야하나요?
%=============GWR ANALYSIS========%
%=============exponential weight========%
info.dtype=’exponential’;
res1=gwr(ln_sale,x,xc,yc,info);
prt(res1, vnames);
more on; matlab r2014a에서 ‘gwr’은(는) 유형 ‘struct’의 입력 인수에 대해 정의되지 않은 함수입니다.
라고 경고문이 뜨는데 , gwr을 하기 위해서는 어떻게 해야하나요?
%=============GWR ANALYSIS========%
%=============exponential weight========%
info.dtype=’exponential’;
res1=gwr(ln_sale,x,xc,yc,info);
prt(res1, vnames);
more on; gwr, gwr struct MATLAB Answers — New Questions