Tag Archives: matlab
tomographic wifi sensing using wifi adapters
hello i would like to ask how to modify the following programs to use wifi adapters rather than sdr to perform tomographic wifi sensing. thanks very much.
https://www.mathworks.com/help/wlan/ug/detect-human-presence-using-wireless-sensing-with-deep-learning.html
https://www.mathworks.com/matlabcentral/fileexchange/43008-2-d-tomographic-reconstruction-demohello i would like to ask how to modify the following programs to use wifi adapters rather than sdr to perform tomographic wifi sensing. thanks very much.
https://www.mathworks.com/help/wlan/ug/detect-human-presence-using-wireless-sensing-with-deep-learning.html
https://www.mathworks.com/matlabcentral/fileexchange/43008-2-d-tomographic-reconstruction-demo hello i would like to ask how to modify the following programs to use wifi adapters rather than sdr to perform tomographic wifi sensing. thanks very much.
https://www.mathworks.com/help/wlan/ug/detect-human-presence-using-wireless-sensing-with-deep-learning.html
https://www.mathworks.com/matlabcentral/fileexchange/43008-2-d-tomographic-reconstruction-demo tomographic, wifi, sensing MATLAB Answers — New Questions
Empty spherical plot – strange error
I find it strange that I get an empty plot with the give command, and get the given error:
Error using matlab.graphics.chart.primitive.Surface
Value must be a vector or 2D array of numeric type.
Error in surf (line 145)
hh = matlab.graphics.chart.primitive.Surface(allargs{:});
Error in polar_coord_soln_Manz (line 59)
surf(X, Y, Z, Psi);
% Constants
hbar = 1.0545718e-34;
m = 9.10938356e-31;
E_ion = 5.139 * 1.60218e-19;
k_f = 2 * m * E_ion / hbar^2;
% Define alpha (renamed to avoid conflict with MATLAB function)
alpha_val = sqrt(k_f);
% Radial wave function
function R = radial_wavefunction(r, n, l, alpha)
L = laguerreL(n-l-1, 2*l+1, alpha * r.^2);
R = sqrt((2 * alpha)^(l+1) / factorial(n-l-1)) .* exp(-alpha * r.^2) .* (alpha * r).^l .* L;
end
% Spherical harmonic (assuming it’s defined elsewhere)
function Y = spherical_harmonic(theta, phi, l, m)
Y = legendre(l, cos(theta)) .* exp(1i * m * phi);
end
% Total wave function in spherical coordinates
function psi = spherical_wavefunction(r, theta, phi, n, l, m, alpha)
R = radial_wavefunction(r, n, l, alpha);
Y = spherical_harmonic(theta, phi, l, m);
psi = R .* Y;
end
% Define grid
r = linspace(0, 10, 50); % Radial coordinate r
theta = linspace(0, pi, 50); % Polar angle theta
phi = linspace(0, 2*pi, 50); % Azimuthal angle phi
% Create grid for 3D plotting
[R, Theta, Phi] = meshgrid(r, theta, phi);
n = 1;
l = 0;
m = 0;
Psi = zeros(size(R));
for i = 1:numel(R)
Psi(i) = abs(spherical_wavefunction(R(i), Theta(i), Phi(i), n, l, m, alpha_val))^2; % Taking absolute value and squaring
end
% Reshape Psi to be 2D
Psi = reshape(Psi, size(R));
% Spherical to Cartesian Conversion
X = R .* sin(Theta) .* cos(Phi);
Y = R .* sin(Theta) .* sin(Phi);
Z = R .* cos(Theta);
% Plotting 3D surface
figure;
surf(X, Y, Z, Psi);
xlabel(‘x’);
ylabel(‘y’);
zlabel(‘z’);
title([‘|psi_{‘, num2str(n), ‘,’, num2str(l), ‘,’, num2str(m), ‘}(r, theta, phi)|^2 for Sodium’]);
colorbar;
axis equal;I find it strange that I get an empty plot with the give command, and get the given error:
Error using matlab.graphics.chart.primitive.Surface
Value must be a vector or 2D array of numeric type.
Error in surf (line 145)
hh = matlab.graphics.chart.primitive.Surface(allargs{:});
Error in polar_coord_soln_Manz (line 59)
surf(X, Y, Z, Psi);
% Constants
hbar = 1.0545718e-34;
m = 9.10938356e-31;
E_ion = 5.139 * 1.60218e-19;
k_f = 2 * m * E_ion / hbar^2;
% Define alpha (renamed to avoid conflict with MATLAB function)
alpha_val = sqrt(k_f);
% Radial wave function
function R = radial_wavefunction(r, n, l, alpha)
L = laguerreL(n-l-1, 2*l+1, alpha * r.^2);
R = sqrt((2 * alpha)^(l+1) / factorial(n-l-1)) .* exp(-alpha * r.^2) .* (alpha * r).^l .* L;
end
% Spherical harmonic (assuming it’s defined elsewhere)
function Y = spherical_harmonic(theta, phi, l, m)
Y = legendre(l, cos(theta)) .* exp(1i * m * phi);
end
% Total wave function in spherical coordinates
function psi = spherical_wavefunction(r, theta, phi, n, l, m, alpha)
R = radial_wavefunction(r, n, l, alpha);
Y = spherical_harmonic(theta, phi, l, m);
psi = R .* Y;
end
% Define grid
r = linspace(0, 10, 50); % Radial coordinate r
theta = linspace(0, pi, 50); % Polar angle theta
phi = linspace(0, 2*pi, 50); % Azimuthal angle phi
% Create grid for 3D plotting
[R, Theta, Phi] = meshgrid(r, theta, phi);
n = 1;
l = 0;
m = 0;
Psi = zeros(size(R));
for i = 1:numel(R)
Psi(i) = abs(spherical_wavefunction(R(i), Theta(i), Phi(i), n, l, m, alpha_val))^2; % Taking absolute value and squaring
end
% Reshape Psi to be 2D
Psi = reshape(Psi, size(R));
% Spherical to Cartesian Conversion
X = R .* sin(Theta) .* cos(Phi);
Y = R .* sin(Theta) .* sin(Phi);
Z = R .* cos(Theta);
% Plotting 3D surface
figure;
surf(X, Y, Z, Psi);
xlabel(‘x’);
ylabel(‘y’);
zlabel(‘z’);
title([‘|psi_{‘, num2str(n), ‘,’, num2str(l), ‘,’, num2str(m), ‘}(r, theta, phi)|^2 for Sodium’]);
colorbar;
axis equal; I find it strange that I get an empty plot with the give command, and get the given error:
Error using matlab.graphics.chart.primitive.Surface
Value must be a vector or 2D array of numeric type.
Error in surf (line 145)
hh = matlab.graphics.chart.primitive.Surface(allargs{:});
Error in polar_coord_soln_Manz (line 59)
surf(X, Y, Z, Psi);
% Constants
hbar = 1.0545718e-34;
m = 9.10938356e-31;
E_ion = 5.139 * 1.60218e-19;
k_f = 2 * m * E_ion / hbar^2;
% Define alpha (renamed to avoid conflict with MATLAB function)
alpha_val = sqrt(k_f);
% Radial wave function
function R = radial_wavefunction(r, n, l, alpha)
L = laguerreL(n-l-1, 2*l+1, alpha * r.^2);
R = sqrt((2 * alpha)^(l+1) / factorial(n-l-1)) .* exp(-alpha * r.^2) .* (alpha * r).^l .* L;
end
% Spherical harmonic (assuming it’s defined elsewhere)
function Y = spherical_harmonic(theta, phi, l, m)
Y = legendre(l, cos(theta)) .* exp(1i * m * phi);
end
% Total wave function in spherical coordinates
function psi = spherical_wavefunction(r, theta, phi, n, l, m, alpha)
R = radial_wavefunction(r, n, l, alpha);
Y = spherical_harmonic(theta, phi, l, m);
psi = R .* Y;
end
% Define grid
r = linspace(0, 10, 50); % Radial coordinate r
theta = linspace(0, pi, 50); % Polar angle theta
phi = linspace(0, 2*pi, 50); % Azimuthal angle phi
% Create grid for 3D plotting
[R, Theta, Phi] = meshgrid(r, theta, phi);
n = 1;
l = 0;
m = 0;
Psi = zeros(size(R));
for i = 1:numel(R)
Psi(i) = abs(spherical_wavefunction(R(i), Theta(i), Phi(i), n, l, m, alpha_val))^2; % Taking absolute value and squaring
end
% Reshape Psi to be 2D
Psi = reshape(Psi, size(R));
% Spherical to Cartesian Conversion
X = R .* sin(Theta) .* cos(Phi);
Y = R .* sin(Theta) .* sin(Phi);
Z = R .* cos(Theta);
% Plotting 3D surface
figure;
surf(X, Y, Z, Psi);
xlabel(‘x’);
ylabel(‘y’);
zlabel(‘z’);
title([‘|psi_{‘, num2str(n), ‘,’, num2str(l), ‘,’, num2str(m), ‘}(r, theta, phi)|^2 for Sodium’]);
colorbar;
axis equal; 3d plots, spherical MATLAB Answers — New Questions
Motion Planning using Frenet Reference Path
Can you please provide about how can I run my customized road scenario using Frenet Reference Path. Because, I’m taking reference of the example by using your exmples in the Object Detection and Motion Planning, however I’m not able to find the right waypoint for my customized Ego Vehicle. Herewith, I’ve attached my waypoint Screen shot and reference link from your website.Can you please provide about how can I run my customized road scenario using Frenet Reference Path. Because, I’m taking reference of the example by using your exmples in the Object Detection and Motion Planning, however I’m not able to find the right waypoint for my customized Ego Vehicle. Herewith, I’ve attached my waypoint Screen shot and reference link from your website. Can you please provide about how can I run my customized road scenario using Frenet Reference Path. Because, I’m taking reference of the example by using your exmples in the Object Detection and Motion Planning, however I’m not able to find the right waypoint for my customized Ego Vehicle. Herewith, I’ve attached my waypoint Screen shot and reference link from your website. frenetreferencepath, roadscenario MATLAB Answers — New Questions
bug parfor: analyzing and transferring files to worker: not done: blocked
Hello there,
I am a running a working script with parfor on matlab, after a while (~1200 iteration on parfor), matlab block without appareant reasons while producing the following message: "analyzing and transferring files to workers…". I am running the parfor on matlab 2023a, on local parfor only. I did validate the cluster of parfor before. The code is working correctly as the 1200 files were done. I tried with other very similar files and it did block also similarly. There is largely enough memory space on my PC. I tried to restart matlab, and also my PC, but this did not solve the problem. I also tried to find solution online, unsuccesfully. Anyone would have an idea ? many thanks for your attention.Hello there,
I am a running a working script with parfor on matlab, after a while (~1200 iteration on parfor), matlab block without appareant reasons while producing the following message: "analyzing and transferring files to workers…". I am running the parfor on matlab 2023a, on local parfor only. I did validate the cluster of parfor before. The code is working correctly as the 1200 files were done. I tried with other very similar files and it did block also similarly. There is largely enough memory space on my PC. I tried to restart matlab, and also my PC, but this did not solve the problem. I also tried to find solution online, unsuccesfully. Anyone would have an idea ? many thanks for your attention. Hello there,
I am a running a working script with parfor on matlab, after a while (~1200 iteration on parfor), matlab block without appareant reasons while producing the following message: "analyzing and transferring files to workers…". I am running the parfor on matlab 2023a, on local parfor only. I did validate the cluster of parfor before. The code is working correctly as the 1200 files were done. I tried with other very similar files and it did block also similarly. There is largely enough memory space on my PC. I tried to restart matlab, and also my PC, but this did not solve the problem. I also tried to find solution online, unsuccesfully. Anyone would have an idea ? many thanks for your attention. parfor, transferring, workers MATLAB Answers — New Questions
Will the usage of college email while registering in Mini Drone Competition 2024 create conflict as the college email is already having a educational access?
Recently my team had came across Minidrone Competition and we have decided to try it out.While going through the guidelines ,I understood that we will be given special access to MATLAB and SIMULINK tools to use in competition.But would it cause any conflicts/error if the email registered had another license(In this case an educational license) in it or should I use a new email without any access?
disp("ThanksInAdvance");Recently my team had came across Minidrone Competition and we have decided to try it out.While going through the guidelines ,I understood that we will be given special access to MATLAB and SIMULINK tools to use in competition.But would it cause any conflicts/error if the email registered had another license(In this case an educational license) in it or should I use a new email without any access?
disp("ThanksInAdvance"); Recently my team had came across Minidrone Competition and we have decided to try it out.While going through the guidelines ,I understood that we will be given special access to MATLAB and SIMULINK tools to use in competition.But would it cause any conflicts/error if the email registered had another license(In this case an educational license) in it or should I use a new email without any access?
disp("ThanksInAdvance"); minidrone competition MATLAB Answers — New Questions
unable to get reference output for synchronous reluctance motor
Unable to get control output for synchronous reluctance motor and kindly give input for how to connect current controller for the motorUnable to get control output for synchronous reluctance motor and kindly give input for how to connect current controller for the motor Unable to get control output for synchronous reluctance motor and kindly give input for how to connect current controller for the motor synchronous reluctance motor, controller MATLAB Answers — New Questions
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
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
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
Trying to make a 2 value sz vector, get Error using tabular/horzcat All input arguments must be tables.
Seems so simple, I’m trying to set a new table size based on values in a previous table
C = sum(app.UITable2.Data(1,:));
No matter how hard I try I can’t get the sum of a single column!
So I give up and do
sz = [C(1,1) 4];
Get the weird error that all inputs must be tables!
Try making sz a known vector type
make a property sz = [4 4]
then try
app.sz = [C(1,1) 4];
Sorry for all the asks but I’m a very experienced C, C++ (and many other languages) programmer but this .m code is driving me crazy! Help give all kinds of useless details about setting Fonts etc but little about simple syntax for e.g. summing a column.
S = sum(A,1); does sum by columns (vs ,2 for by rows but no way to say just do column 1. Even though C is a 1×4 Can’t seem to get the scaler C(1,1) out of it properly.
C(1,1) or C(1) works in the command line, just not in my app created by app designer.
Ultimately all I really want is to make a new table of the correct size with
app.TrialsTable = table(‘Size’,sz,’VariableTypes’,{‘uint8′,’uint8′,’categorical’,’int16′});Seems so simple, I’m trying to set a new table size based on values in a previous table
C = sum(app.UITable2.Data(1,:));
No matter how hard I try I can’t get the sum of a single column!
So I give up and do
sz = [C(1,1) 4];
Get the weird error that all inputs must be tables!
Try making sz a known vector type
make a property sz = [4 4]
then try
app.sz = [C(1,1) 4];
Sorry for all the asks but I’m a very experienced C, C++ (and many other languages) programmer but this .m code is driving me crazy! Help give all kinds of useless details about setting Fonts etc but little about simple syntax for e.g. summing a column.
S = sum(A,1); does sum by columns (vs ,2 for by rows but no way to say just do column 1. Even though C is a 1×4 Can’t seem to get the scaler C(1,1) out of it properly.
C(1,1) or C(1) works in the command line, just not in my app created by app designer.
Ultimately all I really want is to make a new table of the correct size with
app.TrialsTable = table(‘Size’,sz,’VariableTypes’,{‘uint8′,’uint8′,’categorical’,’int16′}); Seems so simple, I’m trying to set a new table size based on values in a previous table
C = sum(app.UITable2.Data(1,:));
No matter how hard I try I can’t get the sum of a single column!
So I give up and do
sz = [C(1,1) 4];
Get the weird error that all inputs must be tables!
Try making sz a known vector type
make a property sz = [4 4]
then try
app.sz = [C(1,1) 4];
Sorry for all the asks but I’m a very experienced C, C++ (and many other languages) programmer but this .m code is driving me crazy! Help give all kinds of useless details about setting Fonts etc but little about simple syntax for e.g. summing a column.
S = sum(A,1); does sum by columns (vs ,2 for by rows but no way to say just do column 1. Even though C is a 1×4 Can’t seem to get the scaler C(1,1) out of it properly.
C(1,1) or C(1) works in the command line, just not in my app created by app designer.
Ultimately all I really want is to make a new table of the correct size with
app.TrialsTable = table(‘Size’,sz,’VariableTypes’,{‘uint8′,’uint8′,’categorical’,’int16′}); sum, vector, table size MATLAB Answers — New Questions