Month: July 2024
Text.Remove a specific word in Power Query
Am I able to use Text.Remove in power Query to remove specific words from a column such as “BLACK” :WHITE” “RED”. if so what is the formula? I have been trying with a custom column and the using Text.Remove and Text.Select
Thank you Eqa
Am I able to use Text.Remove in power Query to remove specific words from a column such as “BLACK” :WHITE” “RED”. if so what is the formula? I have been trying with a custom column and the using Text.Remove and Text.Select Thank you Eqa Read More
Best method to simulate a lead-acid battery to later be used in an MPC Controller
Hi,
Quick question to the experts, I need to estimate/simulate the SOC of a stack of lead-acid batteries, this SOC function will later be used in an MPC controller. I have seen several ways to simulate batteries, however I am still not sure which one is the most suitable in my case:
Simscape Battery
Lead-Acid Battery library ( https://la.mathworks.com/help/simscape/ug/lead-acid-battery.html )
Simscape Electrical – Specialized Power Systems – Sources ( https://la.mathworks.com/help/sps/powersys/ref/battery.html )
Additionally, if the right one is the "Lead-Acid Battery library", how can you connect the cells in series? its a newbie question that I have been trying to solve but I couldnt, I only got it working in parallel but not in parallel.
Many thanks!!
RaulHi,
Quick question to the experts, I need to estimate/simulate the SOC of a stack of lead-acid batteries, this SOC function will later be used in an MPC controller. I have seen several ways to simulate batteries, however I am still not sure which one is the most suitable in my case:
Simscape Battery
Lead-Acid Battery library ( https://la.mathworks.com/help/simscape/ug/lead-acid-battery.html )
Simscape Electrical – Specialized Power Systems – Sources ( https://la.mathworks.com/help/sps/powersys/ref/battery.html )
Additionally, if the right one is the "Lead-Acid Battery library", how can you connect the cells in series? its a newbie question that I have been trying to solve but I couldnt, I only got it working in parallel but not in parallel.
Many thanks!!
Raul Hi,
Quick question to the experts, I need to estimate/simulate the SOC of a stack of lead-acid batteries, this SOC function will later be used in an MPC controller. I have seen several ways to simulate batteries, however I am still not sure which one is the most suitable in my case:
Simscape Battery
Lead-Acid Battery library ( https://la.mathworks.com/help/simscape/ug/lead-acid-battery.html )
Simscape Electrical – Specialized Power Systems – Sources ( https://la.mathworks.com/help/sps/powersys/ref/battery.html )
Additionally, if the right one is the "Lead-Acid Battery library", how can you connect the cells in series? its a newbie question that I have been trying to solve but I couldnt, I only got it working in parallel but not in parallel.
Many thanks!!
Raul battery_system_management, mpc MATLAB Answers — New Questions
Simulink logging intervals with discrete and continuous blocks
Hi all,
In my Simulink Model are some Discrete Blocks (implemented as Level-2 Matlab S-Function) with period time T and also some continuous blocks.
Is it possible to log the output only when the discrete blocks change their output?
Thanks in advance, I really appreciate your answer.Hi all,
In my Simulink Model are some Discrete Blocks (implemented as Level-2 Matlab S-Function) with period time T and also some continuous blocks.
Is it possible to log the output only when the discrete blocks change their output?
Thanks in advance, I really appreciate your answer. Hi all,
In my Simulink Model are some Discrete Blocks (implemented as Level-2 Matlab S-Function) with period time T and also some continuous blocks.
Is it possible to log the output only when the discrete blocks change their output?
Thanks in advance, I really appreciate your answer. simulink, logging MATLAB Answers — New Questions
Add costume buttons to imagesc plot
Hello,
I wish to be able to run operation on an image from the image display. For example: I am presenting a binary image using imagesc, and I want to be able to reshape the data from the display GUI (with additional zero padding if needed). Another example: I want to have "two channels" to the dispaly, an image and a "mask", and I want to be able to present the mask over the image and remove it using a button in the display. Finally, I want to "wrap" all this as a function to which I will give the data ("image" and "mask" data), and that upon calling will generate this gui with the options I mentioned. What will be a good way to approach this?Hello,
I wish to be able to run operation on an image from the image display. For example: I am presenting a binary image using imagesc, and I want to be able to reshape the data from the display GUI (with additional zero padding if needed). Another example: I want to have "two channels" to the dispaly, an image and a "mask", and I want to be able to present the mask over the image and remove it using a button in the display. Finally, I want to "wrap" all this as a function to which I will give the data ("image" and "mask" data), and that upon calling will generate this gui with the options I mentioned. What will be a good way to approach this? Hello,
I wish to be able to run operation on an image from the image display. For example: I am presenting a binary image using imagesc, and I want to be able to reshape the data from the display GUI (with additional zero padding if needed). Another example: I want to have "two channels" to the dispaly, an image and a "mask", and I want to be able to present the mask over the image and remove it using a button in the display. Finally, I want to "wrap" all this as a function to which I will give the data ("image" and "mask" data), and that upon calling will generate this gui with the options I mentioned. What will be a good way to approach this? image processing, gui MATLAB Answers — New Questions
convert 16 bit image to 8 bit image
how to convert 16 bit image to 8 bit imagehow to convert 16 bit image to 8 bit image how to convert 16 bit image to 8 bit image image processing, matlab r2010a MATLAB Answers — New Questions
How do I convert a 24 bit depth image file to an 8 bit depth image file?
I have a 24 bit depth image that needs to be used in a different program. This program however needs only an image of 8 bit depth. I want to be able to change the bit depth at will when generating a TIFF file using MATLAB.I have a 24 bit depth image that needs to be used in a different program. This program however needs only an image of 8 bit depth. I want to be able to change the bit depth at will when generating a TIFF file using MATLAB. I have a 24 bit depth image that needs to be used in a different program. This program however needs only an image of 8 bit depth. I want to be able to change the bit depth at will when generating a TIFF file using MATLAB. bit, depth, tiff, 24, 8, image, processing, convert MATLAB Answers — New Questions
how can i use my GPU from openVPN to my matlab
how can i use my GPU from openVPN to my matlabhow can i use my GPU from openVPN to my matlab how can i use my GPU from openVPN to my matlab ssh, ssl, remote MATLAB Answers — New Questions
If I want to get a radial profile on an image, which program should I use?
I want to get a radial profile for a circular signal on an image.
I am currently wondering which of the following two programs I should use.
https://jp.mathworks.com/matlabcentral/answers/276298-how-to-plot-the-radial-profile-of-a-2d-image
https://jp.mathworks.com/matlabcentral/fileexchange/101480-very-fast-radial-profile
I have tried both and got different profiles.
Which one is more accurate? I would appreciate your answer.I want to get a radial profile for a circular signal on an image.
I am currently wondering which of the following two programs I should use.
https://jp.mathworks.com/matlabcentral/answers/276298-how-to-plot-the-radial-profile-of-a-2d-image
https://jp.mathworks.com/matlabcentral/fileexchange/101480-very-fast-radial-profile
I have tried both and got different profiles.
Which one is more accurate? I would appreciate your answer. I want to get a radial profile for a circular signal on an image.
I am currently wondering which of the following two programs I should use.
https://jp.mathworks.com/matlabcentral/answers/276298-how-to-plot-the-radial-profile-of-a-2d-image
https://jp.mathworks.com/matlabcentral/fileexchange/101480-very-fast-radial-profile
I have tried both and got different profiles.
Which one is more accurate? I would appreciate your answer. image, radial profile MATLAB Answers — New Questions
Unable to delete outlook from my machine (using windows11 home version 23H2).
Hi, I am unable to delete outlook from my startup/laptop (using windows11 home version 23H2).
when I go into installed apps, there is no outlook as you can see here…
it shows up on my startup and when I click on it, it actually opens outlook… Please help
Thanks
Hi, I am unable to delete outlook from my startup/laptop (using windows11 home version 23H2). when I go into installed apps, there is no outlook as you can see here… it shows up on my startup and when I click on it, it actually opens outlook… Please help Thanks Read More
Windows 10 Updates resetting local ethernet
Hi Microsoft Tech Team,
Riddle me this – why o why do your updates reset all my Ethernet settings??? I mean seriously?
Every time there is an update it scrambles my Ethernet and I can spend up to a week meticulously checking every conceivable setting (mainly power management) in the deep dark catacombs of Windows to get a stable connection. It’s infuriating!!
I’ve just come home from an overseas trip, Windows Update required, now my Ethernet is cycling connect-disconnect every 10 second…. I mean why? It was perfectly stable before the update?
Are you hiring monkeys for the Dev Team now?
Hi Microsoft Tech Team, Riddle me this – why o why do your updates reset all my Ethernet settings??? I mean seriously? Every time there is an update it scrambles my Ethernet and I can spend up to a week meticulously checking every conceivable setting (mainly power management) in the deep dark catacombs of Windows to get a stable connection. It’s infuriating!! I’ve just come home from an overseas trip, Windows Update required, now my Ethernet is cycling connect-disconnect every 10 second…. I mean why? It was perfectly stable before the update? Are you hiring monkeys for the Dev Team now? Read More
Write a function called halfsum that takes as input an at most two-dimensional matrix A and computes the sum of the elements of A that are in the diagonal or are to the right of it. example, the input is [1 2 3; 4 5 6; 7 8 9],the ans is 26
function s = halfsum(A)
[row col] = size(A);
if row ~= col
error(‘Expecting a square matrix here people…’);
end
s = 0;
for ii = 1:row
for jj = ii:col
s = s + A(ii,jj);
end
endfunction s = halfsum(A)
[row col] = size(A);
if row ~= col
error(‘Expecting a square matrix here people…’);
end
s = 0;
for ii = 1:row
for jj = ii:col
s = s + A(ii,jj);
end
end function s = halfsum(A)
[row col] = size(A);
if row ~= col
error(‘Expecting a square matrix here people…’);
end
s = 0;
for ii = 1:row
for jj = ii:col
s = s + A(ii,jj);
end
end homework, soft-lock, no more solutions please!!!!!!, make me cry MATLAB Answers — New Questions
PIV image correlation function
Hi all,
I trying to correlate PIV images ( about 100 image). I used the below code that can correlate only the first 2 pair of images and I want to modify the loop so it can correlate the rest images. can somebody help me in modifying the loop?
for i= 1: 100;
for j= 1: 100;
max_correlation=0;
test_xmin=xgrid(i);
test_xmax=xgrid(j)+ 20 %w_width/2;
test_ymin=ygrid(i);
test_ymax=ygrid(j)+ 20 %w_width/2;
x_disp=0;
y_disp=0;
test_ima= Imagea(test_xmin:test_xmax, test_ymin:test_ymax);
test_imb= Imageb(test_xmin-x_disp_max:test_xmax+x_disp_max, test_ymin-y_disp_max:test_ymax+ y_disp_max);
correlation= normxcorr2(test_ima, test_imb);
[xpeak, ypeak]= find (correlation==max(correlation(:) ));
end
end
thanks in advanceHi all,
I trying to correlate PIV images ( about 100 image). I used the below code that can correlate only the first 2 pair of images and I want to modify the loop so it can correlate the rest images. can somebody help me in modifying the loop?
for i= 1: 100;
for j= 1: 100;
max_correlation=0;
test_xmin=xgrid(i);
test_xmax=xgrid(j)+ 20 %w_width/2;
test_ymin=ygrid(i);
test_ymax=ygrid(j)+ 20 %w_width/2;
x_disp=0;
y_disp=0;
test_ima= Imagea(test_xmin:test_xmax, test_ymin:test_ymax);
test_imb= Imageb(test_xmin-x_disp_max:test_xmax+x_disp_max, test_ymin-y_disp_max:test_ymax+ y_disp_max);
correlation= normxcorr2(test_ima, test_imb);
[xpeak, ypeak]= find (correlation==max(correlation(:) ));
end
end
thanks in advance Hi all,
I trying to correlate PIV images ( about 100 image). I used the below code that can correlate only the first 2 pair of images and I want to modify the loop so it can correlate the rest images. can somebody help me in modifying the loop?
for i= 1: 100;
for j= 1: 100;
max_correlation=0;
test_xmin=xgrid(i);
test_xmax=xgrid(j)+ 20 %w_width/2;
test_ymin=ygrid(i);
test_ymax=ygrid(j)+ 20 %w_width/2;
x_disp=0;
y_disp=0;
test_ima= Imagea(test_xmin:test_xmax, test_ymin:test_ymax);
test_imb= Imageb(test_xmin-x_disp_max:test_xmax+x_disp_max, test_ymin-y_disp_max:test_ymax+ y_disp_max);
correlation= normxcorr2(test_ima, test_imb);
[xpeak, ypeak]= find (correlation==max(correlation(:) ));
end
end
thanks in advance piv image correlation MATLAB Answers — New Questions
Create an IFOR formula
I am trying to create a formula to find any fields that are greater than $1,000, if true, then 0, if false, then $5.00. Below are the fields I created and the formula I am trying to use.
=IF(OR(A1>1000,B1>1000,C1>1000,D1>1000,E1>1000,F1>1000,G1>1000), 0,H2)
I am trying to create a formula to find any fields that are greater than $1,000, if true, then 0, if false, then $5.00. Below are the fields I created and the formula I am trying to use. =IF(OR(A1>1000,B1>1000,C1>1000,D1>1000,E1>1000,F1>1000,G1>1000), 0,H2) Read More
How i can write 12 bit rgb image in matlab ?
Dear All,
my goal is to write 12 bit rgb (4 bit for Red, 4 bit for Green, and 4 bit for Blue) image in Matlab.
I already have the image array with size (32,32,3) with range value on 0-15 for each cell.
Does anyone have already done it?
Please let me know if my explanation is not clear.
Thanks.Dear All,
my goal is to write 12 bit rgb (4 bit for Red, 4 bit for Green, and 4 bit for Blue) image in Matlab.
I already have the image array with size (32,32,3) with range value on 0-15 for each cell.
Does anyone have already done it?
Please let me know if my explanation is not clear.
Thanks. Dear All,
my goal is to write 12 bit rgb (4 bit for Red, 4 bit for Green, and 4 bit for Blue) image in Matlab.
I already have the image array with size (32,32,3) with range value on 0-15 for each cell.
Does anyone have already done it?
Please let me know if my explanation is not clear.
Thanks. image processing MATLAB Answers — New Questions
How do I set up MATLAB as the diff and merge tool for TortoiseGit?
I am using TortoiseGit to manage changes to a repository which contains binary files, such as Simulink models (".slx" or ".mdl" files) or live scripts (".mlx" files).
However, when I attempt to diff or merge these files, git fails because they are not text. How do I configure TortoiseGit to use MATLAB’s diff and merge tools for these file types?I am using TortoiseGit to manage changes to a repository which contains binary files, such as Simulink models (".slx" or ".mdl" files) or live scripts (".mlx" files).
However, when I attempt to diff or merge these files, git fails because they are not text. How do I configure TortoiseGit to use MATLAB’s diff and merge tools for these file types? I am using TortoiseGit to manage changes to a repository which contains binary files, such as Simulink models (".slx" or ".mdl" files) or live scripts (".mlx" files).
However, when I attempt to diff or merge these files, git fails because they are not text. How do I configure TortoiseGit to use MATLAB’s diff and merge tools for these file types? MATLAB Answers — New Questions
Read and Write in one scatch
Is it possible in one Arduino sketch to write data to one ThingSpeak field and read data from another field?Is it possible in one Arduino sketch to write data to one ThingSpeak field and read data from another field? Is it possible in one Arduino sketch to write data to one ThingSpeak field and read data from another field? thingspeak MATLAB Answers — New Questions
Any way to automatically save my LiveScript .mlx file as a Text-based .m file?
As given here, LiveScript is rather unhelpful for source control in terms of tractability and interpretation.
https://www.mathworks.com/matlabcentral/answers/271488-how-do-i-use-live-script-mlx-files-in-source-control
I like using LiveScript, but want the ease of source control of a text-based file, such as .m files.
Sometimes, I manually save (a copy of) the LiveScript as a .m file, so that the latest changes may be interpreted in git. Is there a way to automatically copy/save a .m file every time I save the .mlx file?, instead of manually clicking some menu options? This is one way I hope I can access the ease of writing in LiveScript while not compromising on the ease of source control.As given here, LiveScript is rather unhelpful for source control in terms of tractability and interpretation.
https://www.mathworks.com/matlabcentral/answers/271488-how-do-i-use-live-script-mlx-files-in-source-control
I like using LiveScript, but want the ease of source control of a text-based file, such as .m files.
Sometimes, I manually save (a copy of) the LiveScript as a .m file, so that the latest changes may be interpreted in git. Is there a way to automatically copy/save a .m file every time I save the .mlx file?, instead of manually clicking some menu options? This is one way I hope I can access the ease of writing in LiveScript while not compromising on the ease of source control. As given here, LiveScript is rather unhelpful for source control in terms of tractability and interpretation.
https://www.mathworks.com/matlabcentral/answers/271488-how-do-i-use-live-script-mlx-files-in-source-control
I like using LiveScript, but want the ease of source control of a text-based file, such as .m files.
Sometimes, I manually save (a copy of) the LiveScript as a .m file, so that the latest changes may be interpreted in git. Is there a way to automatically copy/save a .m file every time I save the .mlx file?, instead of manually clicking some menu options? This is one way I hope I can access the ease of writing in LiveScript while not compromising on the ease of source control. livescript, source control, 2023a MATLAB Answers — New Questions
A columns’ data under custom sort but still report to subsequent sheets
Hi Everyone,
This is the leaderboard in our sales office at work. In every Sheet (Month), column BP shows each salesman’s total sales for the month in green. It is custom filtered to order the salesmen from most sales to the least in descending order. Resulting in column BP constantly rearranging; so I am struggling to make the final totals in column BP report on the following months column B titled “Last Month” with the correct corresponding salesman. Does anyone know how I can make each sheets column BP report to column B on the following sheet although they sort every day?
Thank you for your time.
Hi Everyone, This is the leaderboard in our sales office at work. In every Sheet (Month), column BP shows each salesman’s total sales for the month in green. It is custom filtered to order the salesmen from most sales to the least in descending order. Resulting in column BP constantly rearranging; so I am struggling to make the final totals in column BP report on the following months column B titled “Last Month” with the correct corresponding salesman. Does anyone know how I can make each sheets column BP report to column B on the following sheet although they sort every day? Thank you for your time. Read More
Defender API – querying IndentityInfo in Advanced Hunting
Hi,
Is any of you having issues with Defender API in Python when running advanced hunting queries that involve the IdentityInfo table?
When i run anything that involves IdentityInfo, i get error 400: bad request. However, if i remove the IdentityInfo from the query, it simply works.
Hi, Is any of you having issues with Defender API in Python when running advanced hunting queries that involve the IdentityInfo table?When i run anything that involves IdentityInfo, i get error 400: bad request. However, if i remove the IdentityInfo from the query, it simply works. Read More
“Repair your computer” from media creation tool doesn’t start
I’ve been having an issue with starting my windows today, as a result of the “reboot and select proper boot device today” error, to which I have already tried rearranging boot disk order in bios, not working. If anyone knows a way to fix that, that would be great, but that is not the relevant problem here. I’m trying to back up my C drive so I can fix a (presumably) corrupted windows booter, and I’ve used the media creation tool to put a windows installation on a USB drive, however when it starts and I try clicking on the “repair your computer” button, it just goes to a blue screen and does nothing. I’ve waited on this for around an hour and tried multiple times again, but it is still the same and never goes to the windows recovery environment as shown in this video.
I’ve been having an issue with starting my windows today, as a result of the “reboot and select proper boot device today” error, to which I have already tried rearranging boot disk order in bios, not working. If anyone knows a way to fix that, that would be great, but that is not the relevant problem here. I’m trying to back up my C drive so I can fix a (presumably) corrupted windows booter, and I’ve used the media creation tool to put a windows installation on a USB drive, however when it starts and I try clicking on the “repair your computer” button, it just goes to a blue screen and does nothing. I’ve waited on this for around an hour and tried multiple times again, but it is still the same and never goes to the windows recovery environment as shown in this video. Read More