Month: July 2024
need to shrink the polygon
I am workin on a project in c# of modeling building for greenBuilding.
for the simulation, I need to put the vertices for the outside of the flat external wall, the the centeral of the wall between flats.
For this, I am doing great and I also calculated the area.
But I also need the NET floor area by reducing the walls thickness.
Not all the wall have the same thickness but I do know this
the Gross area
the thickness of each wall
the length of each wall
How can I substract the walls from the Gross to get the NET floor area
in the example i loaded,
I have the vertices of the pink polygon and use a formuka to find the area of 1400 and than I moved two line by 5 and the rest by 4.
How do I find the net areaI am workin on a project in c# of modeling building for greenBuilding.
for the simulation, I need to put the vertices for the outside of the flat external wall, the the centeral of the wall between flats.
For this, I am doing great and I also calculated the area.
But I also need the NET floor area by reducing the walls thickness.
Not all the wall have the same thickness but I do know this
the Gross area
the thickness of each wall
the length of each wall
How can I substract the walls from the Gross to get the NET floor area
in the example i loaded,
I have the vertices of the pink polygon and use a formuka to find the area of 1400 and than I moved two line by 5 and the rest by 4.
How do I find the net area I am workin on a project in c# of modeling building for greenBuilding.
for the simulation, I need to put the vertices for the outside of the flat external wall, the the centeral of the wall between flats.
For this, I am doing great and I also calculated the area.
But I also need the NET floor area by reducing the walls thickness.
Not all the wall have the same thickness but I do know this
the Gross area
the thickness of each wall
the length of each wall
How can I substract the walls from the Gross to get the NET floor area
in the example i loaded,
I have the vertices of the pink polygon and use a formuka to find the area of 1400 and than I moved two line by 5 and the rest by 4.
How do I find the net area polygon area, vertices MATLAB Answers — New Questions
Design of Strong Prescribed Time (SPT) Controller for Manipulator (Example 2)
I’m working on implementing a Strong Prescribed Time (SPT) controller for a manipulator in MATLAB. I’ve successfully designed the controller for the first example provided in a research paper. However, I’m facing challenges with the second example. Designing the SPT controller for the second example’s manipulator dynamics.
The paper (Ding et al., 2023) outlines the SPT controller design procedure and manipulator dynamics.
type Exmp2.mI’m working on implementing a Strong Prescribed Time (SPT) controller for a manipulator in MATLAB. I’ve successfully designed the controller for the first example provided in a research paper. However, I’m facing challenges with the second example. Designing the SPT controller for the second example’s manipulator dynamics.
The paper (Ding et al., 2023) outlines the SPT controller design procedure and manipulator dynamics.
type Exmp2.m I’m working on implementing a Strong Prescribed Time (SPT) controller for a manipulator in MATLAB. I’ve successfully designed the controller for the first example provided in a research paper. However, I’m facing challenges with the second example. Designing the SPT controller for the second example’s manipulator dynamics.
The paper (Ding et al., 2023) outlines the SPT controller design procedure and manipulator dynamics.
type Exmp2.m control MATLAB Answers — New Questions
Accessing cell array entries using arrays
I have a multi-dimensional cell array and matrix, whose columns correspons to indices of the cell array. I want to populate the cells with arrays that correspond to the indices of the columns that refer to the given cell.
Minimal example:
A=cell(2,2);
B=[1 2 2 1 1; 2 1 2 1 2]
A{1,1}=[4];
A{1,2}=[1,5];
A{2,1}=[2];
A{2,2}=[3]
I’m trying to do this automatically by looping over the columns of the matrix B, but I can’t figure out how to extract the entries of the array without keeping the array form. Calling neither
A(B(:,1))
nor
A{B(:,1)}
produces the correct entry
A{1,2}I have a multi-dimensional cell array and matrix, whose columns correspons to indices of the cell array. I want to populate the cells with arrays that correspond to the indices of the columns that refer to the given cell.
Minimal example:
A=cell(2,2);
B=[1 2 2 1 1; 2 1 2 1 2]
A{1,1}=[4];
A{1,2}=[1,5];
A{2,1}=[2];
A{2,2}=[3]
I’m trying to do this automatically by looping over the columns of the matrix B, but I can’t figure out how to extract the entries of the array without keeping the array form. Calling neither
A(B(:,1))
nor
A{B(:,1)}
produces the correct entry
A{1,2} I have a multi-dimensional cell array and matrix, whose columns correspons to indices of the cell array. I want to populate the cells with arrays that correspond to the indices of the columns that refer to the given cell.
Minimal example:
A=cell(2,2);
B=[1 2 2 1 1; 2 1 2 1 2]
A{1,1}=[4];
A{1,2}=[1,5];
A{2,1}=[2];
A{2,2}=[3]
I’m trying to do this automatically by looping over the columns of the matrix B, but I can’t figure out how to extract the entries of the array without keeping the array form. Calling neither
A(B(:,1))
nor
A{B(:,1)}
produces the correct entry
A{1,2} cell array, index, array MATLAB Answers — New Questions
How to Merge Audio Files into One without Losing Quality on a Computer?
Is there any straightforward way to merge audio files into a single file? I’ve got several audio tracks in different formats (MP3, WAV, FLAC, etc.), and I want to combine them without losing any quality. I’ve tried a few online tools, but they either limit the file size or reduce the audio quality.
Could anyone recommend a reliable method or software that can merge audio files efficiently? Ideally, something that’s easy to use and supports batch processing would be perfect.
Thank you
Is there any straightforward way to merge audio files into a single file? I’ve got several audio tracks in different formats (MP3, WAV, FLAC, etc.), and I want to combine them without losing any quality. I’ve tried a few online tools, but they either limit the file size or reduce the audio quality. Could anyone recommend a reliable method or software that can merge audio files efficiently? Ideally, something that’s easy to use and supports batch processing would be perfect. Thank you Read More
MAM for Edge
Hi,
Does anyone know if it’s possible to remove the registration screen during Microsoft Edge MAM enrollment to make the user experience more transparent and avoid having the user choose options?
Thank you!
Hi,Does anyone know if it’s possible to remove the registration screen during Microsoft Edge MAM enrollment to make the user experience more transparent and avoid having the user choose options? Thank you! Read More
German works council
Can you help me regarding works council agreements on Microsoft Co Pilot? Could anybody share experience or even share a template?
Can you help me regarding works council agreements on Microsoft Co Pilot? Could anybody share experience or even share a template? Read More
How to disable automatic BitLocker implementation when using Autopilot OOBE experience to join a dev
Hello,
At my company, our workstations are not joined to the domain and are managed by Workspace ONE. I would like to join these workstations to Entra ID to use Microsoft accounts to authenticate. However, I will also be using Autopilot to have the OOBE and join the workstations directly. Workspace ONE will be added as an MDM to Entra ID and deployed when provisioning the PCs.
I noticed that BitLocker will be enabled automatically, and the recovery keys will be synced to Entra ID. In my case, I want Workspace ONE to manage the BitLocker keys. How can I disable BitLocker so that when joining the workstations to Entra ID, Workspace ONE will be downloaded and will manage the keys?
Thank you.
Hello, At my company, our workstations are not joined to the domain and are managed by Workspace ONE. I would like to join these workstations to Entra ID to use Microsoft accounts to authenticate. However, I will also be using Autopilot to have the OOBE and join the workstations directly. Workspace ONE will be added as an MDM to Entra ID and deployed when provisioning the PCs. I noticed that BitLocker will be enabled automatically, and the recovery keys will be synced to Entra ID. In my case, I want Workspace ONE to manage the BitLocker keys. How can I disable BitLocker so that when joining the workstations to Entra ID, Workspace ONE will be downloaded and will manage the keys? Thank you. Read More
How do I get Microsoft to Stop Asking Me to Sign In
Attached photo shows annoying banner that Microsoft keeps popping up in my Settings Home Page. I can close it but it comes back regularly. As long as there isn’t a necessity to log into Windows using my Microsoft Account I want to keep using my Local Account. However, I don’t see an option to get Microsoft to stop asking me. I did a search in the forums and didn’t see anything…I probably just entered the wrong keywords. If it exists, can someone point me towards tutorial on how to hide/remove this annoyance? Thanks.
Attached photo shows annoying banner that Microsoft keeps popping up in my Settings Home Page. I can close it but it comes back regularly. As long as there isn’t a necessity to log into Windows using my Microsoft Account I want to keep using my Local Account. However, I don’t see an option to get Microsoft to stop asking me. I did a search in the forums and didn’t see anything…I probably just entered the wrong keywords. If it exists, can someone point me towards tutorial on how to hide/remove this annoyance? Thanks. Read More
Solved How to disable Windows Key Shortcut Guide
Hi all! Does anyone know how to disable the Windows Key Shortcut Guide? It’s the window that pops up after you hold down the Windows key for a few seconds – see attached screenshot.
I don’t want to disable any of the Windows Shortcut Keys – just the window that pops up. TIA for any help.
Hi all! Does anyone know how to disable the Windows Key Shortcut Guide? It’s the window that pops up after you hold down the Windows key for a few seconds – see attached screenshot. I don’t want to disable any of the Windows Shortcut Keys – just the window that pops up. TIA for any help. Read More
How to download Spotify music to mp3 without premium account?
Hi everyone,
Is it possible to download Spotify music to MP3 format so I can play it in my car? Unfortunately, I don’t have a Spotify Premium account, and I’m aware that Spotify’s free tier doesn’t support downloading music for offline use.
Does anyone know of any reliable methods or tools that can help me download Spotify to MP3? I’m open to any suggestions, whether it’s software, online tools, or any other workaround.
Thanks in advance for your help!
Hi everyone, Is it possible to download Spotify music to MP3 format so I can play it in my car? Unfortunately, I don’t have a Spotify Premium account, and I’m aware that Spotify’s free tier doesn’t support downloading music for offline use. Does anyone know of any reliable methods or tools that can help me download Spotify to MP3? I’m open to any suggestions, whether it’s software, online tools, or any other workaround. Thanks in advance for your help! Read More
How to get access to windows copilot with the power automate plugin?
So I wanted to try out the power automate plugin for windows copilot, and updated my build to the latest in the insider prog’s dev channel (26120.961 ge_release)
But instead of getting access to new windows copilot features, I’ve completely lost access to windows copilot. The copilot icon on my machine now takes me to the web version instead of the local one.
What should I do to get access to a version of Windows copilot with the power automate plugin? Or if that’s not possible how to at least restore my windows copilot access ;;
So I wanted to try out the power automate plugin for windows copilot, and updated my build to the latest in the insider prog’s dev channel (26120.961 ge_release) But instead of getting access to new windows copilot features, I’ve completely lost access to windows copilot. The copilot icon on my machine now takes me to the web version instead of the local one. What should I do to get access to a version of Windows copilot with the power automate plugin? Or if that’s not possible how to at least restore my windows copilot access ;; Read More
Recommend a good YouTube video downloader for PC Windows 11 please?
Anyone know of a good YouTube video downloder for Windows 11? I am looking for a YouTube video downloader compatible with Windows 11, mainly for downloading videos from my own channel. I need this tool to help me back up and watch my uploaded videos offline.
I have tried several YouTube video downloaders before, but none of them were satisfactory: some downloaded very slowly, some had poor video quality, and some had ads or security risks. I hope to find a downloader that is fast and safe, easy to use, and does not contain ads. If you have any good recommendations, please share your experience, thank you very much!
Anyone know of a good YouTube video downloder for Windows 11? I am looking for a YouTube video downloader compatible with Windows 11, mainly for downloading videos from my own channel. I need this tool to help me back up and watch my uploaded videos offline. I have tried several YouTube video downloaders before, but none of them were satisfactory: some downloaded very slowly, some had poor video quality, and some had ads or security risks. I hope to find a downloader that is fast and safe, easy to use, and does not contain ads. If you have any good recommendations, please share your experience, thank you very much! Read More
Getting Error of mclmcrrt.dll while opening the MPLOT in EMTP
I am currently working on the EMTP software and after simulation while i start MPLOT it showing me an error,
I tried installing the 9.3 version but still getting the same error. Please Let me know if anyone got the solution.I am currently working on the EMTP software and after simulation while i start MPLOT it showing me an error,
I tried installing the 9.3 version but still getting the same error. Please Let me know if anyone got the solution. I am currently working on the EMTP software and after simulation while i start MPLOT it showing me an error,
I tried installing the 9.3 version but still getting the same error. Please Let me know if anyone got the solution. dll, emtp, mplot, error MATLAB Answers — New Questions
Matlab python package. ModuleNotFoundError: No module named ‘wheel’
Hi installing python packaged matlab function results in this error when running to create a wheel starting of pip version 24.
This works fine for pip 23, can anyone help solve this?
pip wheel –no-cache-dir –use-pep517 "wwd-celloutput-r2023a @ file:///home/sander/dev/calculators/model/matlab/WWD_calculator_package"
× Building wheel for wwd-celloutput-r2023a (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
bdist_wheel requires the ‘wheel’ module, which can be installed via pip.
Traceback (most recent call last):
File "/home/sander/.cache/pypoetry/virtualenvs/calculators-4b8SRMwI-py3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/sander/.cache/pypoetry/virtualenvs/calculators-4b8SRMwI-py3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
File "/home/sander/.cache/pypoetry/virtualenvs/calculators-4b8SRMwI-py3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-540icr8g/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 415, in build_wheel
return self._build_with_temp_dir(
File "/tmp/pip-build-env-540icr8g/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-540icr8g/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 497, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-540icr8g/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 313, in run_setup
exec(code, locals())
File "<string>", line 23, in <module>
ModuleNotFoundError: No module named ‘wheel’
[end of output]Hi installing python packaged matlab function results in this error when running to create a wheel starting of pip version 24.
This works fine for pip 23, can anyone help solve this?
pip wheel –no-cache-dir –use-pep517 "wwd-celloutput-r2023a @ file:///home/sander/dev/calculators/model/matlab/WWD_calculator_package"
× Building wheel for wwd-celloutput-r2023a (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
bdist_wheel requires the ‘wheel’ module, which can be installed via pip.
Traceback (most recent call last):
File "/home/sander/.cache/pypoetry/virtualenvs/calculators-4b8SRMwI-py3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/sander/.cache/pypoetry/virtualenvs/calculators-4b8SRMwI-py3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
File "/home/sander/.cache/pypoetry/virtualenvs/calculators-4b8SRMwI-py3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-540icr8g/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 415, in build_wheel
return self._build_with_temp_dir(
File "/tmp/pip-build-env-540icr8g/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-540icr8g/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 497, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-540icr8g/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 313, in run_setup
exec(code, locals())
File "<string>", line 23, in <module>
ModuleNotFoundError: No module named ‘wheel’
[end of output] Hi installing python packaged matlab function results in this error when running to create a wheel starting of pip version 24.
This works fine for pip 23, can anyone help solve this?
pip wheel –no-cache-dir –use-pep517 "wwd-celloutput-r2023a @ file:///home/sander/dev/calculators/model/matlab/WWD_calculator_package"
× Building wheel for wwd-celloutput-r2023a (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
bdist_wheel requires the ‘wheel’ module, which can be installed via pip.
Traceback (most recent call last):
File "/home/sander/.cache/pypoetry/virtualenvs/calculators-4b8SRMwI-py3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/sander/.cache/pypoetry/virtualenvs/calculators-4b8SRMwI-py3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
File "/home/sander/.cache/pypoetry/virtualenvs/calculators-4b8SRMwI-py3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-540icr8g/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 415, in build_wheel
return self._build_with_temp_dir(
File "/tmp/pip-build-env-540icr8g/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-540icr8g/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 497, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-540icr8g/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 313, in run_setup
exec(code, locals())
File "<string>", line 23, in <module>
ModuleNotFoundError: No module named ‘wheel’
[end of output] python, package, pip MATLAB Answers — New Questions
How to speed up this code?
Dear All,
I have this code but when I run it it takes one day and half to run. How can I speed it up?
Best regards,
Ara
clear all;
clc;
% Set the folder path where the .nc files are located
folderPath = ‘E:datapodtc_apr’;
% Get a list of all NetCDF files in the folder
fileList = dir(fullfile(folderPath, ‘*_nc’));
numFiles = numel(fileList);
% Initialize the data structures
data = cell(numFiles, 1);
dateArray = [];
typeArray = cell(numFiles, 1);
% Loop through each file
for fileIndex = 1:numFiles
% Read the NetCDF file
filePath = fullfile(folderPath, fileList(fileIndex).name);
% Read the data from the NetCDF file
ncinfo_struct = ncinfo(filePath);
if isfield(ncinfo_struct, ‘Variables’)
variable_names = {ncinfo_struct.Variables.Name};
if all(ismember({‘time’, ‘TEC’, ‘S4’, ‘RFI’, ‘elevation’, ‘occheight’, ‘caL1_SNR’, ‘pL2_SNR’, ‘x_LEO’, ‘y_LEO’, ‘z_LEO’, ‘x_GPS’, ‘y_GPS’, ‘z_GPS’}, variable_names))
% Extract the date and type information from the file name
[~, filename, ~] = fileparts(fileList(fileIndex).name);
dateStr = regexp(filename, ‘d{4}.d{3}’, ‘match’, ‘once’);
typeStr = regexp(filename, ‘Gd{2}|Rd{2}’, ‘match’, ‘once’);
% Read the data from the NetCDF file
data{fileIndex}.time = ncread(filePath, ‘time’);
data{fileIndex}.TEC = ncread(filePath, ‘TEC’);
data{fileIndex}.S4 = ncread(filePath, ‘S4’);
data{fileIndex}.RFI = ncread(filePath, ‘RFI’);
data{fileIndex}.elevation = ncread(filePath, ‘elevation’);
data{fileIndex}.occheight = ncread(filePath, ‘occheight’);
data{fileIndex}.caL1_SNR = ncread(filePath, ‘caL1_SNR’);
data{fileIndex}.pL2_SNR = ncread(filePath, ‘pL2_SNR’);
data{fileIndex}.x_LEO = ncread(filePath, ‘x_LEO’);
data{fileIndex}.y_LEO = ncread(filePath, ‘y_LEO’);
data{fileIndex}.z_LEO = ncread(filePath, ‘z_LEO’);
data{fileIndex}.x_GPS = ncread(filePath, ‘x_GPS’);
data{fileIndex}.y_GPS = ncread(filePath, ‘y_GPS’);
data{fileIndex}.z_GPS = ncread(filePath, ‘z_GPS’);
% Store the date and type information
dateArray = [dateArray, str2double(dateStr)];
typeArray{fileIndex} = typeStr;
else
% Skip this file and move on to the next one
fprintf(‘File "%s" does not contain all the required variables. Skipping this file.n’, fileList(fileIndex).name);
continue;
end
else
% Skip this file and move on to the next one
fprintf(‘File "%s" does not contain the "Variables" field. Skipping this file.n’, fileList(fileIndex).name);
continue;
end
end
% Sort the data by date and type
[sortedDates, sortedIndices] = sort(dateArray);
sortedTypes = cellfun(@(x) x, typeArray(sortedIndices), ‘UniformOutput’, false);
% Create the sorted data structures
sortedData = cell(numFiles, 1);
for i = 1:numFiles
sortedData{i} = data{sortedIndices(i)};
end
% Save the data to a .mat file
save(‘podtc_apr_data.mat’, ‘sortedData’, ‘sortedDates’, ‘sortedTypes’);Dear All,
I have this code but when I run it it takes one day and half to run. How can I speed it up?
Best regards,
Ara
clear all;
clc;
% Set the folder path where the .nc files are located
folderPath = ‘E:datapodtc_apr’;
% Get a list of all NetCDF files in the folder
fileList = dir(fullfile(folderPath, ‘*_nc’));
numFiles = numel(fileList);
% Initialize the data structures
data = cell(numFiles, 1);
dateArray = [];
typeArray = cell(numFiles, 1);
% Loop through each file
for fileIndex = 1:numFiles
% Read the NetCDF file
filePath = fullfile(folderPath, fileList(fileIndex).name);
% Read the data from the NetCDF file
ncinfo_struct = ncinfo(filePath);
if isfield(ncinfo_struct, ‘Variables’)
variable_names = {ncinfo_struct.Variables.Name};
if all(ismember({‘time’, ‘TEC’, ‘S4’, ‘RFI’, ‘elevation’, ‘occheight’, ‘caL1_SNR’, ‘pL2_SNR’, ‘x_LEO’, ‘y_LEO’, ‘z_LEO’, ‘x_GPS’, ‘y_GPS’, ‘z_GPS’}, variable_names))
% Extract the date and type information from the file name
[~, filename, ~] = fileparts(fileList(fileIndex).name);
dateStr = regexp(filename, ‘d{4}.d{3}’, ‘match’, ‘once’);
typeStr = regexp(filename, ‘Gd{2}|Rd{2}’, ‘match’, ‘once’);
% Read the data from the NetCDF file
data{fileIndex}.time = ncread(filePath, ‘time’);
data{fileIndex}.TEC = ncread(filePath, ‘TEC’);
data{fileIndex}.S4 = ncread(filePath, ‘S4’);
data{fileIndex}.RFI = ncread(filePath, ‘RFI’);
data{fileIndex}.elevation = ncread(filePath, ‘elevation’);
data{fileIndex}.occheight = ncread(filePath, ‘occheight’);
data{fileIndex}.caL1_SNR = ncread(filePath, ‘caL1_SNR’);
data{fileIndex}.pL2_SNR = ncread(filePath, ‘pL2_SNR’);
data{fileIndex}.x_LEO = ncread(filePath, ‘x_LEO’);
data{fileIndex}.y_LEO = ncread(filePath, ‘y_LEO’);
data{fileIndex}.z_LEO = ncread(filePath, ‘z_LEO’);
data{fileIndex}.x_GPS = ncread(filePath, ‘x_GPS’);
data{fileIndex}.y_GPS = ncread(filePath, ‘y_GPS’);
data{fileIndex}.z_GPS = ncread(filePath, ‘z_GPS’);
% Store the date and type information
dateArray = [dateArray, str2double(dateStr)];
typeArray{fileIndex} = typeStr;
else
% Skip this file and move on to the next one
fprintf(‘File "%s" does not contain all the required variables. Skipping this file.n’, fileList(fileIndex).name);
continue;
end
else
% Skip this file and move on to the next one
fprintf(‘File "%s" does not contain the "Variables" field. Skipping this file.n’, fileList(fileIndex).name);
continue;
end
end
% Sort the data by date and type
[sortedDates, sortedIndices] = sort(dateArray);
sortedTypes = cellfun(@(x) x, typeArray(sortedIndices), ‘UniformOutput’, false);
% Create the sorted data structures
sortedData = cell(numFiles, 1);
for i = 1:numFiles
sortedData{i} = data{sortedIndices(i)};
end
% Save the data to a .mat file
save(‘podtc_apr_data.mat’, ‘sortedData’, ‘sortedDates’, ‘sortedTypes’); Dear All,
I have this code but when I run it it takes one day and half to run. How can I speed it up?
Best regards,
Ara
clear all;
clc;
% Set the folder path where the .nc files are located
folderPath = ‘E:datapodtc_apr’;
% Get a list of all NetCDF files in the folder
fileList = dir(fullfile(folderPath, ‘*_nc’));
numFiles = numel(fileList);
% Initialize the data structures
data = cell(numFiles, 1);
dateArray = [];
typeArray = cell(numFiles, 1);
% Loop through each file
for fileIndex = 1:numFiles
% Read the NetCDF file
filePath = fullfile(folderPath, fileList(fileIndex).name);
% Read the data from the NetCDF file
ncinfo_struct = ncinfo(filePath);
if isfield(ncinfo_struct, ‘Variables’)
variable_names = {ncinfo_struct.Variables.Name};
if all(ismember({‘time’, ‘TEC’, ‘S4’, ‘RFI’, ‘elevation’, ‘occheight’, ‘caL1_SNR’, ‘pL2_SNR’, ‘x_LEO’, ‘y_LEO’, ‘z_LEO’, ‘x_GPS’, ‘y_GPS’, ‘z_GPS’}, variable_names))
% Extract the date and type information from the file name
[~, filename, ~] = fileparts(fileList(fileIndex).name);
dateStr = regexp(filename, ‘d{4}.d{3}’, ‘match’, ‘once’);
typeStr = regexp(filename, ‘Gd{2}|Rd{2}’, ‘match’, ‘once’);
% Read the data from the NetCDF file
data{fileIndex}.time = ncread(filePath, ‘time’);
data{fileIndex}.TEC = ncread(filePath, ‘TEC’);
data{fileIndex}.S4 = ncread(filePath, ‘S4’);
data{fileIndex}.RFI = ncread(filePath, ‘RFI’);
data{fileIndex}.elevation = ncread(filePath, ‘elevation’);
data{fileIndex}.occheight = ncread(filePath, ‘occheight’);
data{fileIndex}.caL1_SNR = ncread(filePath, ‘caL1_SNR’);
data{fileIndex}.pL2_SNR = ncread(filePath, ‘pL2_SNR’);
data{fileIndex}.x_LEO = ncread(filePath, ‘x_LEO’);
data{fileIndex}.y_LEO = ncread(filePath, ‘y_LEO’);
data{fileIndex}.z_LEO = ncread(filePath, ‘z_LEO’);
data{fileIndex}.x_GPS = ncread(filePath, ‘x_GPS’);
data{fileIndex}.y_GPS = ncread(filePath, ‘y_GPS’);
data{fileIndex}.z_GPS = ncread(filePath, ‘z_GPS’);
% Store the date and type information
dateArray = [dateArray, str2double(dateStr)];
typeArray{fileIndex} = typeStr;
else
% Skip this file and move on to the next one
fprintf(‘File "%s" does not contain all the required variables. Skipping this file.n’, fileList(fileIndex).name);
continue;
end
else
% Skip this file and move on to the next one
fprintf(‘File "%s" does not contain the "Variables" field. Skipping this file.n’, fileList(fileIndex).name);
continue;
end
end
% Sort the data by date and type
[sortedDates, sortedIndices] = sort(dateArray);
sortedTypes = cellfun(@(x) x, typeArray(sortedIndices), ‘UniformOutput’, false);
% Create the sorted data structures
sortedData = cell(numFiles, 1);
for i = 1:numFiles
sortedData{i} = data{sortedIndices(i)};
end
% Save the data to a .mat file
save(‘podtc_apr_data.mat’, ‘sortedData’, ‘sortedDates’, ‘sortedTypes’); speed up run MATLAB Answers — New Questions
I want to implement CSRF protection into my javascript (ajax request) code in sharepoint.
i want this to overcome – User account details can be exploited using Cross Site Scripting Forgery Attack (CSRF)
I have code in JavaScript that is used to update the data in my SharePoint list. and I want to enable CSRF protection in the code. So can anyone help me with how to implement the CSRF token into the Javascript code?
I implemented code to update the list data into Sharepoint, but while I performed that implementation in the Burp Suite browser, I got the SOAP request for it, and then when I executed that request with updated user details, it allowed me to update the list data into Sharepoint using burp suite. Based on my research, I found that we have to implement a CSRF token to stop the CSRF attacks.
I also found that in Sharepoint, we have a RequestDigest token instead of a CSRF token so i tried RequestDigest code into the header of my ajax api but still i can update data from the burp suite. so please help me to stop this kind of CSRF attacks ?
i want this to overcome – User account details can be exploited using Cross Site Scripting Forgery Attack (CSRF) I have code in JavaScript that is used to update the data in my SharePoint list. and I want to enable CSRF protection in the code. So can anyone help me with how to implement the CSRF token into the Javascript code? I implemented code to update the list data into Sharepoint, but while I performed that implementation in the Burp Suite browser, I got the SOAP request for it, and then when I executed that request with updated user details, it allowed me to update the list data into Sharepoint using burp suite. Based on my research, I found that we have to implement a CSRF token to stop the CSRF attacks. I also found that in Sharepoint, we have a RequestDigest token instead of a CSRF token so i tried RequestDigest code into the header of my ajax api but still i can update data from the burp suite. so please help me to stop this kind of CSRF attacks ? Read More
How to fix Q.B desktop 2022 keeps shutting down after update?
I’m experiencing a recurring issue with Quick-Books Desktop 2022—it keeps shutting down unexpectedly during use. This happens multiple times a day, often in the middle of processing transactions. Has anyone else encountered this problem? Any suggestions or fixes from the community would be greatly appreciated!
I’m experiencing a recurring issue with Quick-Books Desktop 2022—it keeps shutting down unexpectedly during use. This happens multiple times a day, often in the middle of processing transactions. Has anyone else encountered this problem? Any suggestions or fixes from the community would be greatly appreciated! Read More
What happen when to existing Visio diagrams when downgraded from Plan 1 to Standard
Hi Guys,
Need some help in understanding Visio licensing.
We have M365 Enterprise license, in that we have Visio web as well for all M365 users.
One user is having Vision Plan 1 licence, he is not logged into visio in past 90ays, so we are downgrading his licence to Visio Web, does it impact it’s diagram if we downgrade user licence, existing data will remain same ? Kindly suggest.
Hi Guys, Need some help in understanding Visio licensing.We have M365 Enterprise license, in that we have Visio web as well for all M365 users. One user is having Vision Plan 1 licence, he is not logged into visio in past 90ays, so we are downgrading his licence to Visio Web, does it impact it’s diagram if we downgrade user licence, existing data will remain same ? Kindly suggest. Read More
Subtitles in another language for a teams conference doesn’t make any sense
Hi everyone,
If someone wants to rewatch the conference recording and set the subtitle language to English (the main language of the conference is German), the subtitles currently do not make sense.
Is this an issue with settings, possibly because the language was not correctly set in the conference options, or is it a licensing problem?
What needs to be considered to ensure that the subtitles are correctly translated in the recording?
Hi everyone, If someone wants to rewatch the conference recording and set the subtitle language to English (the main language of the conference is German), the subtitles currently do not make sense.Is this an issue with settings, possibly because the language was not correctly set in the conference options, or is it a licensing problem?What needs to be considered to ensure that the subtitles are correctly translated in the recording? Read More
What causes Quick-Books Error PS038 related to paycheck data, and how can it be fixed?
I’m encountering Q.B Error PS038 related to paycheck data. Could you explain why this error happens and provide a solution to fix it? I’ve updated Quick-Books already, but the problem persists.
I’m encountering Q.B Error PS038 related to paycheck data. Could you explain why this error happens and provide a solution to fix it? I’ve updated Quick-Books already, but the problem persists. Read More