Month: July 2024
How to change the color of shapefile in pcolor plot
I have a pcolor global plot over which i have imposed a worldcoastal shapefile. However, i wish to change the default color from blue to black.I have a pcolor global plot over which i have imposed a worldcoastal shapefile. However, i wish to change the default color from blue to black. I have a pcolor global plot over which i have imposed a worldcoastal shapefile. However, i wish to change the default color from blue to black. shapefile, pcolor, edgecolor, facecolor MATLAB Answers — New Questions
Training a deep neural network with a database as input
After converting my data into a combined datastore, I tried training a deep neural network with the architecture shown below but the error " Error forming mini-batch for network input "sequence_prop". Data interpreted with format "CBT". To specify a different format, use the InputDataFormats option.
Error in netPaperv4 net = trainnet(dsTrain, net, "mse", options);
Caused by:
Batch dimension of datastore must match the format batch dimension (2)." occurred.
Here a datastore preview: 1×2 cell array
{[-0.2964 -0.2723 0 0.3049 0.1613 -0.9312]} {[2.2746]}
I want to combine three different sequence inputs (the goal is time series forecasting, not image classification: my inputs are all time-depending sequences) : two of size 1 and the other of size 4 to predict a single output (size 1).
Can anyone help me solve this? I can provide code if needed.After converting my data into a combined datastore, I tried training a deep neural network with the architecture shown below but the error " Error forming mini-batch for network input "sequence_prop". Data interpreted with format "CBT". To specify a different format, use the InputDataFormats option.
Error in netPaperv4 net = trainnet(dsTrain, net, "mse", options);
Caused by:
Batch dimension of datastore must match the format batch dimension (2)." occurred.
Here a datastore preview: 1×2 cell array
{[-0.2964 -0.2723 0 0.3049 0.1613 -0.9312]} {[2.2746]}
I want to combine three different sequence inputs (the goal is time series forecasting, not image classification: my inputs are all time-depending sequences) : two of size 1 and the other of size 4 to predict a single output (size 1).
Can anyone help me solve this? I can provide code if needed. After converting my data into a combined datastore, I tried training a deep neural network with the architecture shown below but the error " Error forming mini-batch for network input "sequence_prop". Data interpreted with format "CBT". To specify a different format, use the InputDataFormats option.
Error in netPaperv4 net = trainnet(dsTrain, net, "mse", options);
Caused by:
Batch dimension of datastore must match the format batch dimension (2)." occurred.
Here a datastore preview: 1×2 cell array
{[-0.2964 -0.2723 0 0.3049 0.1613 -0.9312]} {[2.2746]}
I want to combine three different sequence inputs (the goal is time series forecasting, not image classification: my inputs are all time-depending sequences) : two of size 1 and the other of size 4 to predict a single output (size 1).
Can anyone help me solve this? I can provide code if needed. deep neural network, deep learning, time series forecasting, database, time series MATLAB Answers — New Questions
Output Error of ultrasonicDetectionGenerator in Simulink
The measurement error that occurred previously is no longer happening.
If no input is provided to the Scenario Reader, no errors occur.
However, when I start providing values through parkEgo in the Scenario, the ultrasonicDetectionGenerator fails to produce any output and continuously encounters errors.
The simulation does not terminate due to the error, but it remains stuck without producing any output, and when I press ctrl+c in the Matlab command window, it always shows an error in the Implement of ultrasonicDetectionGenerator.
https://kr.mathworks.com/matlabcentral/answers/2137952-measurement-error-of-ultrasonic-sensor-in-driving-scenario-designer/?s_tid=ans_lp_feed_leaf
Due to the above issue, I am currently using the prerelease version 2024b.
시뮬레이션 중에 오류가 발생하여 시뮬레이션이 종료되었습니다
원인:
‘ultrasonicDetectionGenerator’의 ‘stepImpl’ 메서드를 호출할 때 MATLAB System 블록 ‘AIV_robot/Environment/Simulation/Ultrasonic Sensor Processing/Ultrasonic5’에서 오류가 발생했습니다.
프로그램 중단(Ctrl+C)이 감지되었습니다.
An error occurred during the simulation, causing it to terminate.
Cause:
An error occurred in the MATLAB System block ‘AIV_robot/Environment/Simulation/Ultrasonic Sensor Processing/Ultrasonic5’ while calling the ‘stepImpl’ method of ‘ultrasonicDetectionGenerator’.
Program interruption (Ctrl+C) was detected.The measurement error that occurred previously is no longer happening.
If no input is provided to the Scenario Reader, no errors occur.
However, when I start providing values through parkEgo in the Scenario, the ultrasonicDetectionGenerator fails to produce any output and continuously encounters errors.
The simulation does not terminate due to the error, but it remains stuck without producing any output, and when I press ctrl+c in the Matlab command window, it always shows an error in the Implement of ultrasonicDetectionGenerator.
https://kr.mathworks.com/matlabcentral/answers/2137952-measurement-error-of-ultrasonic-sensor-in-driving-scenario-designer/?s_tid=ans_lp_feed_leaf
Due to the above issue, I am currently using the prerelease version 2024b.
시뮬레이션 중에 오류가 발생하여 시뮬레이션이 종료되었습니다
원인:
‘ultrasonicDetectionGenerator’의 ‘stepImpl’ 메서드를 호출할 때 MATLAB System 블록 ‘AIV_robot/Environment/Simulation/Ultrasonic Sensor Processing/Ultrasonic5’에서 오류가 발생했습니다.
프로그램 중단(Ctrl+C)이 감지되었습니다.
An error occurred during the simulation, causing it to terminate.
Cause:
An error occurred in the MATLAB System block ‘AIV_robot/Environment/Simulation/Ultrasonic Sensor Processing/Ultrasonic5’ while calling the ‘stepImpl’ method of ‘ultrasonicDetectionGenerator’.
Program interruption (Ctrl+C) was detected. The measurement error that occurred previously is no longer happening.
If no input is provided to the Scenario Reader, no errors occur.
However, when I start providing values through parkEgo in the Scenario, the ultrasonicDetectionGenerator fails to produce any output and continuously encounters errors.
The simulation does not terminate due to the error, but it remains stuck without producing any output, and when I press ctrl+c in the Matlab command window, it always shows an error in the Implement of ultrasonicDetectionGenerator.
https://kr.mathworks.com/matlabcentral/answers/2137952-measurement-error-of-ultrasonic-sensor-in-driving-scenario-designer/?s_tid=ans_lp_feed_leaf
Due to the above issue, I am currently using the prerelease version 2024b.
시뮬레이션 중에 오류가 발생하여 시뮬레이션이 종료되었습니다
원인:
‘ultrasonicDetectionGenerator’의 ‘stepImpl’ 메서드를 호출할 때 MATLAB System 블록 ‘AIV_robot/Environment/Simulation/Ultrasonic Sensor Processing/Ultrasonic5’에서 오류가 발생했습니다.
프로그램 중단(Ctrl+C)이 감지되었습니다.
An error occurred during the simulation, causing it to terminate.
Cause:
An error occurred in the MATLAB System block ‘AIV_robot/Environment/Simulation/Ultrasonic Sensor Processing/Ultrasonic5’ while calling the ‘stepImpl’ method of ‘ultrasonicDetectionGenerator’.
Program interruption (Ctrl+C) was detected. driving scenario designer, ultrasonicdetectiongenerator, scenarioreader, simulink, matlab MATLAB Answers — New Questions
Example: Use WinPE To Remove A Non-Functional Driver From An Offline 10 / 11 Image
REM List All 3rd-Party Drivers on an Offline Windows 10/11 Image
IF NOT EXIST “C:Scrtch” MKDIR “C:Scrtch”
PowerShell -NoProfile -ExecutionPolicy Bypass -Command “& {Get-WindowsDriver -Path C: -ScratchDirectory C:Scrtch | Sort ProviderName | Format-Table Driver,ProviderName,ClassName,BootCritical,OriginalFileName -AutoSize | Out-String -Stream -Width 32767}”
RMDIR /S /Q “C:Scrtch”
REM Create a UTF-8 Text File That Lists All 3rd-Party Drivers on an Offline Windows 10/11 Image
IF NOT EXIST “C:Scrtch” MKDIR “C:Scrtch”
PowerShell -NoProfile -ExecutionPolicy Bypass -Command “& {Set-Content -Path ‘C:Driver_List.txt’ -value (Get-WindowsDriver -Path C: -ScratchDirectory C:Scrtch | Sort ProviderName | Format-Table Driver,ProviderName,ClassName,BootCritical,OriginalFileName -AutoSize | Out-String -Stream -Width 32767)}”
RMDIR /S /Q “C:Scrtch”
REM Remove a Driver from an Offline Windows 10/11 Image
IF NOT EXIST “C:Scrtch” MKDIR “C:Scrtch”
PowerShell -NoProfile -ExecutionPolicy Bypass -Command “& {Remove-WindowsDriver -Driver oem<NUMBER>.inf -Path C: -ScratchDirectory C:Scrtch}”
RMDIR /S /Q “C:Scrtch”
REM List All 3rd-Party Drivers on an Offline Windows 10/11 Image
IF NOT EXIST “C:Scrtch” MKDIR “C:Scrtch”
PowerShell -NoProfile -ExecutionPolicy Bypass -Command “& {Get-WindowsDriver -Path C: -ScratchDirectory C:Scrtch | Sort ProviderName | Format-Table Driver,ProviderName,ClassName,BootCritical,OriginalFileName -AutoSize | Out-String -Stream -Width 32767}”
RMDIR /S /Q “C:Scrtch”
REM Create a UTF-8 Text File That Lists All 3rd-Party Drivers on an Offline Windows 10/11 Image
IF NOT EXIST “C:Scrtch” MKDIR “C:Scrtch”
PowerShell -NoProfile -ExecutionPolicy Bypass -Command “& {Set-Content -Path ‘C:Driver_List.txt’ -value (Get-WindowsDriver -Path C: -ScratchDirectory C:Scrtch | Sort ProviderName | Format-Table Driver,ProviderName,ClassName,BootCritical,OriginalFileName -AutoSize | Out-String -Stream -Width 32767)}”
RMDIR /S /Q “C:Scrtch”
REM Remove a Driver from an Offline Windows 10/11 Image
IF NOT EXIST “C:Scrtch” MKDIR “C:Scrtch”
PowerShell -NoProfile -ExecutionPolicy Bypass -Command “& {Remove-WindowsDriver -Driver oem<NUMBER>.inf -Path C: -ScratchDirectory C:Scrtch}”
RMDIR /S /Q “C:Scrtch” Read More
Conditiona access policy forCitrix Xenapp browser applications
Hi EveryoneI need some assistance with Conditional access policy .My scenariosI wanted CAP to require MFA if users are coming from trusted device(Compay issues) but untrusted location (outside home country) and no MFA if coming from trusted device(Compay issues) but trusted location (home country) for applications If users coming from untrusted devices ,it is always MFA .After i configure two CAP ,my citrix xenapp users (loging to citrix and opening browsers ) are also requiring MFA How i make sure citrix xenapp browser users are also not prompted for Multitfactor Authenction.ThanksImran Nawaz Read More
How can I write a script to replace a specific integer value in my table, with the average of the data above and below that integer in the table
Basically, I am trying to write a script to be able to find the value 999 in my table, and add the nearest possible values above and below the 999.
For example, if 999 were a value in row 10, column 4, I would want to add 12+18, then divide by 2, and then replace that 999. If 12, 16, 18 were all set to 999, I would want to add 10 and 22, then divide by 2. Then replace 12, 16, 18 all with 16.
Complete beginner to matlab, so I don’t understand the syntax of how I would do this. Is this even possible with any sort of loop?Basically, I am trying to write a script to be able to find the value 999 in my table, and add the nearest possible values above and below the 999.
For example, if 999 were a value in row 10, column 4, I would want to add 12+18, then divide by 2, and then replace that 999. If 12, 16, 18 were all set to 999, I would want to add 10 and 22, then divide by 2. Then replace 12, 16, 18 all with 16.
Complete beginner to matlab, so I don’t understand the syntax of how I would do this. Is this even possible with any sort of loop? Basically, I am trying to write a script to be able to find the value 999 in my table, and add the nearest possible values above and below the 999.
For example, if 999 were a value in row 10, column 4, I would want to add 12+18, then divide by 2, and then replace that 999. If 12, 16, 18 were all set to 999, I would want to add 10 and 22, then divide by 2. Then replace 12, 16, 18 all with 16.
Complete beginner to matlab, so I don’t understand the syntax of how I would do this. Is this even possible with any sort of loop? table, script MATLAB Answers — New Questions
I have a txt file which has data in netcdf format. How to read it?
so i downloaded imerg data for 90 days from GES DISC. the whole file got downloaded in txt but the data in it looks like this
https://data.gesdisc.earthdata.nasa.gov/data/GPM_L3/GPM_3IMERGDF.07/2023/06/3B-DAY.MS.MRG.3IMERG.20230618-S000000-E235959.V07B.nc4. i have 90 of these. how can i open this in matalb. i want to plot a graph like this. how can i do it.so i downloaded imerg data for 90 days from GES DISC. the whole file got downloaded in txt but the data in it looks like this
https://data.gesdisc.earthdata.nasa.gov/data/GPM_L3/GPM_3IMERGDF.07/2023/06/3B-DAY.MS.MRG.3IMERG.20230618-S000000-E235959.V07B.nc4. i have 90 of these. how can i open this in matalb. i want to plot a graph like this. how can i do it. so i downloaded imerg data for 90 days from GES DISC. the whole file got downloaded in txt but the data in it looks like this
https://data.gesdisc.earthdata.nasa.gov/data/GPM_L3/GPM_3IMERGDF.07/2023/06/3B-DAY.MS.MRG.3IMERG.20230618-S000000-E235959.V07B.nc4. i have 90 of these. how can i open this in matalb. i want to plot a graph like this. how can i do it. txt file, plot, geoplot MATLAB Answers — New Questions
How to read a raw image URL directly from a GitHub public repository via the imread function?
As far as I know, imread built-in function supports to read the image address file of a URL directly, but for a certain URL image address in public repository on Github, I can’t read it by MATLAB, instead I can read it by using linux command `wget`, may I know how to read the image correctly by imread function?
Example:
imgPath = "https://github.com/Experience-Monks/360-image-viewer/blob/master/demo/pano_2048.jpg";
img = imread(imgPath);As far as I know, imread built-in function supports to read the image address file of a URL directly, but for a certain URL image address in public repository on Github, I can’t read it by MATLAB, instead I can read it by using linux command `wget`, may I know how to read the image correctly by imread function?
Example:
imgPath = "https://github.com/Experience-Monks/360-image-viewer/blob/master/demo/pano_2048.jpg";
img = imread(imgPath); As far as I know, imread built-in function supports to read the image address file of a URL directly, but for a certain URL image address in public repository on Github, I can’t read it by MATLAB, instead I can read it by using linux command `wget`, may I know how to read the image correctly by imread function?
Example:
imgPath = "https://github.com/Experience-Monks/360-image-viewer/blob/master/demo/pano_2048.jpg";
img = imread(imgPath); imread, github MATLAB Answers — New Questions
How can I properly create an standalone APP which includes python .py scripts?
Hello, I am facing difficulties to properly compile an standalone Matlab APP which includes python .py scripts. It works fine inside Matlab 2022a environment, however the standalone APP (from APP Designer) does not work, it sounds a beep and the .py scripts don´t run properly. Is there a guide or educational material that I could follow to make that in the proper way?
Is there something that I should include in the Startup FCN ?
Thanks,Hello, I am facing difficulties to properly compile an standalone Matlab APP which includes python .py scripts. It works fine inside Matlab 2022a environment, however the standalone APP (from APP Designer) does not work, it sounds a beep and the .py scripts don´t run properly. Is there a guide or educational material that I could follow to make that in the proper way?
Is there something that I should include in the Startup FCN ?
Thanks, Hello, I am facing difficulties to properly compile an standalone Matlab APP which includes python .py scripts. It works fine inside Matlab 2022a environment, however the standalone APP (from APP Designer) does not work, it sounds a beep and the .py scripts don´t run properly. Is there a guide or educational material that I could follow to make that in the proper way?
Is there something that I should include in the Startup FCN ?
Thanks, matlab compiler, app designer, appdesigner, python MATLAB Answers — New Questions
Sequencing with Duplicate Numbers and Alternating Text
I’m creating sequences with a static numbered prefix, 2 repeated numbers that must sequence with an alternating A/B pattern and cannot figure out the proper coding for it. Any help would be appreciated.
19-001A
19-001B,
19-002A
19-002B
19-003A
19-003B
I’m creating sequences with a static numbered prefix, 2 repeated numbers that must sequence with an alternating A/B pattern and cannot figure out the proper coding for it. Any help would be appreciated. 19-001A19-001B,19-002A19-002B19-003A19-003B Read More
Using epsilon in legend
I want to use Greek symbol epsilon "ɛ" in my legend and I use epsilon. But it gives me "є" . I found a solution using char(949). But I can not use subscript with that. Actually I need to write "ɛ_21". Can anyone please help me?I want to use Greek symbol epsilon "ɛ" in my legend and I use epsilon. But it gives me "є" . I found a solution using char(949). But I can not use subscript with that. Actually I need to write "ɛ_21". Can anyone please help me? I want to use Greek symbol epsilon "ɛ" in my legend and I use epsilon. But it gives me "є" . I found a solution using char(949). But I can not use subscript with that. Actually I need to write "ɛ_21". Can anyone please help me? epsilon, greek symbol MATLAB Answers — New Questions
Extracting profiles from a point cloud surface along the mazimum dip of the plane
Dear all,
Based on the result of this code (blue cloud rotated), I need to extract a series of profiles (with a fixed diastance) to get the Z values of all the points constituting the profile. These profiles should be extracted from vertical planes oriented according to the maximum slope of the cloud.
Thanks in advance!!
you have other ideas, they are accepted!! I have included a sketch of what I would like.
clear all
close all
clc
load(‘XYZ’);
X = XYZ(:,1);
Y = XYZ(:,2);
Z = XYZ(:,3);
xyz0=mean(XYZ,1);
A=XYZ-xyz0; % center the data at zero
% Find the direction of most variance using SVD and rotate the data to make
% that the x-axis
[~,~,V]=svd(A,0);
a=cross(V(:,3),[0;0;1]);
T=makehgtform(‘axisrotate’, a, -atan2(norm(a),V(3,3)));
R=T(1:3,1:3);
A_rot = A*R;
A_rot = A_rot + [xyz0(1) xyz0(2) 0]; % move so the centers are aligned in z-diection
% Plot the raw data
close all
scatter3(X,Y,Z,0.1,"magenta")
hold on
scatter3(A_rot(:,1),A_rot(:,2),A_rot(:,3),0.1,’blue’);
xlabel(‘X-Axis’,’FontSize’,14,’FontWeight’,’bold’)
ylabel(‘Y-Axis’,’FontSize’,14,’FontWeight’,’bold’)
zlabel(‘Z-Axis’,’FontSize’,14,’FontWeight’,’bold’)
axis equalDear all,
Based on the result of this code (blue cloud rotated), I need to extract a series of profiles (with a fixed diastance) to get the Z values of all the points constituting the profile. These profiles should be extracted from vertical planes oriented according to the maximum slope of the cloud.
Thanks in advance!!
you have other ideas, they are accepted!! I have included a sketch of what I would like.
clear all
close all
clc
load(‘XYZ’);
X = XYZ(:,1);
Y = XYZ(:,2);
Z = XYZ(:,3);
xyz0=mean(XYZ,1);
A=XYZ-xyz0; % center the data at zero
% Find the direction of most variance using SVD and rotate the data to make
% that the x-axis
[~,~,V]=svd(A,0);
a=cross(V(:,3),[0;0;1]);
T=makehgtform(‘axisrotate’, a, -atan2(norm(a),V(3,3)));
R=T(1:3,1:3);
A_rot = A*R;
A_rot = A_rot + [xyz0(1) xyz0(2) 0]; % move so the centers are aligned in z-diection
% Plot the raw data
close all
scatter3(X,Y,Z,0.1,"magenta")
hold on
scatter3(A_rot(:,1),A_rot(:,2),A_rot(:,3),0.1,’blue’);
xlabel(‘X-Axis’,’FontSize’,14,’FontWeight’,’bold’)
ylabel(‘Y-Axis’,’FontSize’,14,’FontWeight’,’bold’)
zlabel(‘Z-Axis’,’FontSize’,14,’FontWeight’,’bold’)
axis equal Dear all,
Based on the result of this code (blue cloud rotated), I need to extract a series of profiles (with a fixed diastance) to get the Z values of all the points constituting the profile. These profiles should be extracted from vertical planes oriented according to the maximum slope of the cloud.
Thanks in advance!!
you have other ideas, they are accepted!! I have included a sketch of what I would like.
clear all
close all
clc
load(‘XYZ’);
X = XYZ(:,1);
Y = XYZ(:,2);
Z = XYZ(:,3);
xyz0=mean(XYZ,1);
A=XYZ-xyz0; % center the data at zero
% Find the direction of most variance using SVD and rotate the data to make
% that the x-axis
[~,~,V]=svd(A,0);
a=cross(V(:,3),[0;0;1]);
T=makehgtform(‘axisrotate’, a, -atan2(norm(a),V(3,3)));
R=T(1:3,1:3);
A_rot = A*R;
A_rot = A_rot + [xyz0(1) xyz0(2) 0]; % move so the centers are aligned in z-diection
% Plot the raw data
close all
scatter3(X,Y,Z,0.1,"magenta")
hold on
scatter3(A_rot(:,1),A_rot(:,2),A_rot(:,3),0.1,’blue’);
xlabel(‘X-Axis’,’FontSize’,14,’FontWeight’,’bold’)
ylabel(‘Y-Axis’,’FontSize’,14,’FontWeight’,’bold’)
zlabel(‘Z-Axis’,’FontSize’,14,’FontWeight’,’bold’)
axis equal profile extraction, point cloud MATLAB Answers — New Questions
Excel – refer to a sheet by name
Hello,
I need to:
(1) select a sheet by name not by Item number
(2) assign a hyperlink from a cell in a named sheet to A1 of another sheet.
for (1),I tried line 61. anything below line 61 is in progress. just trying to ‘translate’ the VBA into matlab. Any suggestions would be welcomed.
Thanks
Tuli
— code start —–
function h = excel_test_2
% OPEN EXCEL APPLICATION
excellapp = actxserver(‘Excel.Application’);
% Show the Excel window
set(excellapp, ‘Visible’, 1);
% INSERT NEW WORKBOOK
W = excellapp.Workbooks.Add;
% WORKBOOKS CONTAIN WORKSHEETS
Sheets = excellapp.ActiveWorkBook.Sheets;
% Leave just one
n = Sheets.Count;
for ii=n:-1:2
Sheets.Item(ii).Delete;
end
for ii=1:20
n = Sheets.Count;
if ii>1
Sheets.Add( [], Sheets.Item(n) );
end
Sheets.Item(ii).Name = [‘test_’ num2str(ii)];
end
% Add a fourth sheet (by default, a workbook contains
% three worksheets – add a new one before [], after #3)
Sheets.Add( [], Sheets.Item(3) );
% Rename
Sheets.Item(1).Name = ‘History Long’;
Sheets.Item(2).Name = ‘History Short’;
% Set active sheet #1
Sheets.Item(1).Activate;
ActiveSheet = excellapp.Activesheet;
% Title
ActiveSheetRange = get(ActiveSheet,’Range’,’A1′);
set(ActiveSheetRange,’Value’,’Date&Time’,…
‘ColumnWidth’,15);
set(ActiveSheetRange.Font,’FontStyle’,’Bold’,’Size’,13,’Color’,128);
% Title2
ActiveSheetRange = get(ActiveSheet,’Range’,’A2′);
set(ActiveSheetRange,’Value’,’222133013′,…
‘ColumnWidth’,15);
set(ActiveSheetRange.Font,’FontStyle’,’Bold’,’Size’,13,’Color’,128);
%———— add color change and hyperlink ———————
T10 = ‘ValueJet4’
M10 = ‘test_9’
%Range(‘A2’).Select %select cell A2 in ‘Hystory Long’
%Sheets.Item(1).Activate;
Sheets(M10).Activate;
% ActiveSheetRange = get(ActiveSheet,’Range’,’A2′);
%
% Selection.Copy % copy content of A2
%
% Sheets(M10).Select %select target sheet name
%
% Sheets(M10).Name = T10 % assign new name
%
% Sheets(T10).Select
% ActiveWorkbook.Sheets(T10).Tab.ColorIndex = 3
%
% Sheets(‘History Long’).Select
% Range(‘A2’).Select
% S10 = T10 & ‘!A1’
% ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=”, SubAddress:=S10
return
—– code end —–Hello,
I need to:
(1) select a sheet by name not by Item number
(2) assign a hyperlink from a cell in a named sheet to A1 of another sheet.
for (1),I tried line 61. anything below line 61 is in progress. just trying to ‘translate’ the VBA into matlab. Any suggestions would be welcomed.
Thanks
Tuli
— code start —–
function h = excel_test_2
% OPEN EXCEL APPLICATION
excellapp = actxserver(‘Excel.Application’);
% Show the Excel window
set(excellapp, ‘Visible’, 1);
% INSERT NEW WORKBOOK
W = excellapp.Workbooks.Add;
% WORKBOOKS CONTAIN WORKSHEETS
Sheets = excellapp.ActiveWorkBook.Sheets;
% Leave just one
n = Sheets.Count;
for ii=n:-1:2
Sheets.Item(ii).Delete;
end
for ii=1:20
n = Sheets.Count;
if ii>1
Sheets.Add( [], Sheets.Item(n) );
end
Sheets.Item(ii).Name = [‘test_’ num2str(ii)];
end
% Add a fourth sheet (by default, a workbook contains
% three worksheets – add a new one before [], after #3)
Sheets.Add( [], Sheets.Item(3) );
% Rename
Sheets.Item(1).Name = ‘History Long’;
Sheets.Item(2).Name = ‘History Short’;
% Set active sheet #1
Sheets.Item(1).Activate;
ActiveSheet = excellapp.Activesheet;
% Title
ActiveSheetRange = get(ActiveSheet,’Range’,’A1′);
set(ActiveSheetRange,’Value’,’Date&Time’,…
‘ColumnWidth’,15);
set(ActiveSheetRange.Font,’FontStyle’,’Bold’,’Size’,13,’Color’,128);
% Title2
ActiveSheetRange = get(ActiveSheet,’Range’,’A2′);
set(ActiveSheetRange,’Value’,’222133013′,…
‘ColumnWidth’,15);
set(ActiveSheetRange.Font,’FontStyle’,’Bold’,’Size’,13,’Color’,128);
%———— add color change and hyperlink ———————
T10 = ‘ValueJet4’
M10 = ‘test_9’
%Range(‘A2’).Select %select cell A2 in ‘Hystory Long’
%Sheets.Item(1).Activate;
Sheets(M10).Activate;
% ActiveSheetRange = get(ActiveSheet,’Range’,’A2′);
%
% Selection.Copy % copy content of A2
%
% Sheets(M10).Select %select target sheet name
%
% Sheets(M10).Name = T10 % assign new name
%
% Sheets(T10).Select
% ActiveWorkbook.Sheets(T10).Tab.ColorIndex = 3
%
% Sheets(‘History Long’).Select
% Range(‘A2’).Select
% S10 = T10 & ‘!A1’
% ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=”, SubAddress:=S10
return
—– code end —– Hello,
I need to:
(1) select a sheet by name not by Item number
(2) assign a hyperlink from a cell in a named sheet to A1 of another sheet.
for (1),I tried line 61. anything below line 61 is in progress. just trying to ‘translate’ the VBA into matlab. Any suggestions would be welcomed.
Thanks
Tuli
— code start —–
function h = excel_test_2
% OPEN EXCEL APPLICATION
excellapp = actxserver(‘Excel.Application’);
% Show the Excel window
set(excellapp, ‘Visible’, 1);
% INSERT NEW WORKBOOK
W = excellapp.Workbooks.Add;
% WORKBOOKS CONTAIN WORKSHEETS
Sheets = excellapp.ActiveWorkBook.Sheets;
% Leave just one
n = Sheets.Count;
for ii=n:-1:2
Sheets.Item(ii).Delete;
end
for ii=1:20
n = Sheets.Count;
if ii>1
Sheets.Add( [], Sheets.Item(n) );
end
Sheets.Item(ii).Name = [‘test_’ num2str(ii)];
end
% Add a fourth sheet (by default, a workbook contains
% three worksheets – add a new one before [], after #3)
Sheets.Add( [], Sheets.Item(3) );
% Rename
Sheets.Item(1).Name = ‘History Long’;
Sheets.Item(2).Name = ‘History Short’;
% Set active sheet #1
Sheets.Item(1).Activate;
ActiveSheet = excellapp.Activesheet;
% Title
ActiveSheetRange = get(ActiveSheet,’Range’,’A1′);
set(ActiveSheetRange,’Value’,’Date&Time’,…
‘ColumnWidth’,15);
set(ActiveSheetRange.Font,’FontStyle’,’Bold’,’Size’,13,’Color’,128);
% Title2
ActiveSheetRange = get(ActiveSheet,’Range’,’A2′);
set(ActiveSheetRange,’Value’,’222133013′,…
‘ColumnWidth’,15);
set(ActiveSheetRange.Font,’FontStyle’,’Bold’,’Size’,13,’Color’,128);
%———— add color change and hyperlink ———————
T10 = ‘ValueJet4’
M10 = ‘test_9’
%Range(‘A2’).Select %select cell A2 in ‘Hystory Long’
%Sheets.Item(1).Activate;
Sheets(M10).Activate;
% ActiveSheetRange = get(ActiveSheet,’Range’,’A2′);
%
% Selection.Copy % copy content of A2
%
% Sheets(M10).Select %select target sheet name
%
% Sheets(M10).Name = T10 % assign new name
%
% Sheets(T10).Select
% ActiveWorkbook.Sheets(T10).Tab.ColorIndex = 3
%
% Sheets(‘History Long’).Select
% Range(‘A2’).Select
% S10 = T10 & ‘!A1’
% ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=”, SubAddress:=S10
return
—– code end —– control excel hyperlink MATLAB Answers — New Questions
In Simulink, why do two unrelated modules affect each other?
In Simulink, I created two computation modules A and B, as shown in Figure 1. Modules A and B are independent of each other and do not share any data. When A and B are not connected, the time history chart calculated by Module A is shown in Figure 1. However, when A is connected to B, Module A calculates a different time history chart, as shown in Figure 2. Note that Module B does not form a closed-loop with Module A. Why does this situation occur? I would appreciate it if anyone could tell me the reason, thank you very much.
Additionally, I found that as long as module A is connected with the transfer function module (without forming a closed-loop circuit), the time course graph on the oscilloscope will change.In Simulink, I created two computation modules A and B, as shown in Figure 1. Modules A and B are independent of each other and do not share any data. When A and B are not connected, the time history chart calculated by Module A is shown in Figure 1. However, when A is connected to B, Module A calculates a different time history chart, as shown in Figure 2. Note that Module B does not form a closed-loop with Module A. Why does this situation occur? I would appreciate it if anyone could tell me the reason, thank you very much.
Additionally, I found that as long as module A is connected with the transfer function module (without forming a closed-loop circuit), the time course graph on the oscilloscope will change. In Simulink, I created two computation modules A and B, as shown in Figure 1. Modules A and B are independent of each other and do not share any data. When A and B are not connected, the time history chart calculated by Module A is shown in Figure 1. However, when A is connected to B, Module A calculates a different time history chart, as shown in Figure 2. Note that Module B does not form a closed-loop with Module A. Why does this situation occur? I would appreciate it if anyone could tell me the reason, thank you very much.
Additionally, I found that as long as module A is connected with the transfer function module (without forming a closed-loop circuit), the time course graph on the oscilloscope will change. module, interact, simulink MATLAB Answers — New Questions
Create Userform from Module
I’m looking for a way to create a UserForm that will be generated when a VBA Module is ran instead of having to load the UserForm itself. I already have the code written for the command button “Enter” but am having trouble finding articles online on how to create the code for creating the form. Thanks for any help you guys can provide!
I’m looking for a way to create a UserForm that will be generated when a VBA Module is ran instead of having to load the UserForm itself. I already have the code written for the command button “Enter” but am having trouble finding articles online on how to create the code for creating the form. Thanks for any help you guys can provide! Read More
Accelerate growth with Microsoft through the AI and marketplace opportunity: 7/23 at 9 am PT
If you are an ISV and are interested in accelerating growth with the marketplace, check out this great event happening next week!
“Accelerate growth with Microsoft through the AI and marketplace opportunity” on July 23 from 9 – 11 am PST.
Scale your cloud GTM in FY25 with co-sell and the partner ecosystem, powered by the marketplace. Learn how to transform your marketplace strategy with first-hand insights. Learn the latest trends, winning strategies, and solutions to common challenges directly from Microsoft and Cloud GTM leaders from top companies.
Commercial marketplace experts will share how to scale cloud GTM in FY25 with co-sell and the partner ecosystem, powered by the marketplace.
Content highlights include:
Strategies for SaaS Businesses to Stand Out in a Cloud Marketplace
Maximizing Co-Selling and Co-Marketing Opportunities
Scaling Beyond Initial Listing and Transactions
Why multiparty private offers are 2X larger than direct to customer private offers and how to take advantage or it
The role of channel partners in Cloud GTM: SIs, VARs, MSPs.
The growing influence of Service Partners in Cloud GTM
If you are an ISV and are interested in accelerating growth with the marketplace, check out this great event happening next week!
“Accelerate growth with Microsoft through the AI and marketplace opportunity” on July 23 from 9 – 11 am PST.
Scale your cloud GTM in FY25 with co-sell and the partner ecosystem, powered by the marketplace. Learn how to transform your marketplace strategy with first-hand insights. Learn the latest trends, winning strategies, and solutions to common challenges directly from Microsoft and Cloud GTM leaders from top companies.
Commercial marketplace experts will share how to scale cloud GTM in FY25 with co-sell and the partner ecosystem, powered by the marketplace.
Content highlights include:
Strategies for SaaS Businesses to Stand Out in a Cloud Marketplace
Maximizing Co-Selling and Co-Marketing Opportunities
Scaling Beyond Initial Listing and Transactions
Why multiparty private offers are 2X larger than direct to customer private offers and how to take advantage or it
The role of channel partners in Cloud GTM: SIs, VARs, MSPs.
The growing influence of Service Partners in Cloud GTM Read More
windows 11, not found: apps & features
1.) access the Settings menu on your Windows 11 computer
2.) n the Settings menu, navigate to “Apps & Features.” NOT FLOUND
Therefore, I can’t install virtual machine
apps –> apps & features –> optional features –> add a feature, then type “Virtual Machine Platform.”
OS build: 22631.3880, 23H2, win11
1.) access the Settings menu on your Windows 11 computer2.) n the Settings menu, navigate to “Apps & Features.” NOT FLOUNDTherefore, I can’t install virtual machineapps –> apps & features –> optional features –> add a feature, then type “Virtual Machine Platform.” OS build: 22631.3880, 23H2, win11 Read More
“Classic” Outlook works fine, but “New” Outlook cannot find server
This is a work account, so I can’t do much (any) digging around in registries, etc., but even our IT department is stumped.
I can launch “Old”/”Classic” Outlook just fine. Everything loads, and syncs perfectly, but if I hit the toggle to switch to “New” Outlook, I get an error saying that the server cannot be found.
I can log in through the web just fine, as well.
Here’s the kicker: IT guy shows up and tries to log in to New Outlook with HIS credentials, and it works.
Tried so far with no luck (not necessarily in this order):
olk.exe –clearLocalState. (not sure if he ran this as Admin… I’ll check w/ him tomorrow)
Uninstall/Reinstall all of MS Office
Reset Outlook profile
Completely reset my user account on the computer
Set-CASMailbox -Identity <MailboxIdentity> -OneWinNativeOutlookEnabled $true
I’m confused, IT is confused. Everyone is confused.
Anybody have any ideas they could recommend, because we’re getting desperate at this point.
This is a work account, so I can’t do much (any) digging around in registries, etc., but even our IT department is stumped. I can launch “Old”/”Classic” Outlook just fine. Everything loads, and syncs perfectly, but if I hit the toggle to switch to “New” Outlook, I get an error saying that the server cannot be found. I can log in through the web just fine, as well. Here’s the kicker: IT guy shows up and tries to log in to New Outlook with HIS credentials, and it works. Tried so far with no luck (not necessarily in this order):olk.exe –clearLocalState. (not sure if he ran this as Admin… I’ll check w/ him tomorrow)Uninstall/Reinstall all of MS OfficeReset Outlook profileCompletely reset my user account on the computerSet-CASMailbox -Identity <MailboxIdentity> -OneWinNativeOutlookEnabled $trueI’m confused, IT is confused. Everyone is confused. Anybody have any ideas they could recommend, because we’re getting desperate at this point. Read More
Sharepoint Code Snippet – Copy Code button
Hey everyone,
I want to use the organisation SharePoint to create a kind of code repository for the team to use: nothing too complicated, mostly HTML elements for our LMS. I know it’s a minor thing, but non-tech-non-coders will be copy-pasting these elements and they keep missing either a < at the start or a > at the end or often the <div>…
Hey everyone,I want to use the organisation SharePoint to create a kind of code repository for the team to use: nothing too complicated, mostly HTML elements for our LMS. I know it’s a minor thing, but non-tech-non-coders will be copy-pasting these elements and they keep missing either a < at the start or a > at the end or often the <div>… Read More
Recently installed a M2 samsung ssd, but is not showing on windows. Any tips?
So, yeah. A couple of weeks ago the thing did appear, but then one day it did not, and I’ve no idea what happened. In the disk management app the thing shows up, but the only option I get is to “Convert to dynamic disk” and “properties”, not to create new volumes…and for some reason it has less memory than what the thing says it has? Any help would be apprecated you guys
So, yeah. A couple of weeks ago the thing did appear, but then one day it did not, and I’ve no idea what happened. In the disk management app the thing shows up, but the only option I get is to “Convert to dynamic disk” and “properties”, not to create new volumes…and for some reason it has less memory than what the thing says it has? Any help would be apprecated you guys Read More