Category: News
Distribution of one number over different categories with specific probabilities per category
Hi all,
I’ve been trying to create a formula to distribute a given amount of points over multiple different categories with different probabilities for each individual category.
So for example 10 points over 6 different categories with 50% probability for each point to be added to category 1, 20% for category 2, 10% for categories 3 and 4, and 5% for categories 5 and 6.
I appreciate any ideas!
Hi all, I’ve been trying to create a formula to distribute a given amount of points over multiple different categories with different probabilities for each individual category.So for example 10 points over 6 different categories with 50% probability for each point to be added to category 1, 20% for category 2, 10% for categories 3 and 4, and 5% for categories 5 and 6. I appreciate any ideas! Read More
Inbox
How to find emails recieved just now? A notification at top right appears but it wont appear in the inbox. Sometimes when i click on top right notification, the mail opens, sometimes dont.
How to find emails recieved just now? A notification at top right appears but it wont appear in the inbox. Sometimes when i click on top right notification, the mail opens, sometimes dont. Read More
HOW RREFMOVIE IS PLACED IN THE MATLAB VERSION 2015?
HELM MEHELM ME HELM ME thanks MATLAB Answers — New Questions
Conway game of life problem – cycle start conditions..
Hey, I have been asked to find all the cycle start conditions in Game of Life, for a 10*10 square. Before that, I have written the code to the game, and a code which finds all the cycle start conditions for an n*n square, but the problem is that for that I have found all the possible start conditions (there are 2^n^2 of them) and for every start condition I implemented the rules for a finite number and checked if in some point I got a changed matrix that identical to my first matrix.
But this isn’t possible to 10*10 matrix because I need for that 2^100 matrices… ANOTHER IDEA ANYBODY?Hey, I have been asked to find all the cycle start conditions in Game of Life, for a 10*10 square. Before that, I have written the code to the game, and a code which finds all the cycle start conditions for an n*n square, but the problem is that for that I have found all the possible start conditions (there are 2^n^2 of them) and for every start condition I implemented the rules for a finite number and checked if in some point I got a changed matrix that identical to my first matrix.
But this isn’t possible to 10*10 matrix because I need for that 2^100 matrices… ANOTHER IDEA ANYBODY? Hey, I have been asked to find all the cycle start conditions in Game of Life, for a 10*10 square. Before that, I have written the code to the game, and a code which finds all the cycle start conditions for an n*n square, but the problem is that for that I have found all the possible start conditions (there are 2^n^2 of them) and for every start condition I implemented the rules for a finite number and checked if in some point I got a changed matrix that identical to my first matrix.
But this isn’t possible to 10*10 matrix because I need for that 2^100 matrices… ANOTHER IDEA ANYBODY? conway, game of life, matrix, overflow MATLAB Answers — New Questions
Getting amplitude from a noisy signal
I’m working on analyzing some data from a grain boundary in an atomic simulation; the included file has the relevant variables. I’ve got a lot of somewhat similar data to go through and am trying to determine a reliable way to get the amplitude of my data. There are a few complications that make the different tools I’m using difficult:
The x-axis location sometimes shifts forward and backwards, but usually by negligible amounts. My included code sorts it to be ascending simply because many solutions require it, but an implementation that doesn’t need to sort would reduce error.
The data has noise that make a lot of "false peaks" and "false valleys" that play havoc on using a simple findpeak function. Unfortunately, the sample rate for my data isn’t high enough to make this easy. Perhaps leveraging the periodic behavior of the signal could help?
My attempts to smooth out the noise with a filter drastically reduce the amplitude, when that is the variable I am trying to study. I’ve been using a 2nd order savitzky-golay filter via the sgolayfilt() command, but I do not know if that is the best fit for this work.
I have very little experience with signal processing, and only somewhat more with MatLab. I think a fourier decomposition and then reconstructing the signal would be my next best option, but after plotting the power spectrum and deciding that somewhere around 0.36 angstroms would be a good cutoff I’m not sure how to proceed. I feel like this would get an accurate periodicity, and then perhaps I could use a combination of movmean with movmax and movmin to get the original amplitude. It isn’t yet clear if the periodicity varies slightly.
The following code plots the power spectrum and frequency, then the actual data (sorted along x-axis).
%% Load data
Temp = ’10’;
fileName = [‘powerDump’, Temp, ‘.mat’];
load(fileName);
%% Sort data by position
[~,sortID] = sort(newGBLocation);
%% compute power spectrum
% pspectrum expects increasing second argument, but it moves erratically in
% the negative Z-direction and needs sorting
[p,f] = pspectrum(newPEAverage(sortID),newGBLocation(sortID)-min(newGBLocation));
% plot energy vs. position data [Angstroms]
figure
plot(newGBLocation(sortID)-min(newGBLocation),newPEAverage(sortID),’r-‘)
xlabel(‘Position $[AA]$’,’interpreter’,’latex’)
ylabel(‘Potential Energy [eV]’,’interpreter’,’latex’)
% plot power vs. wavelength [Angstroms]
figure;
plot(1./f,p);
xlabel(‘$lambda [AA]$’,’interpreter’,’latex’)
ylabel(‘Power’,’interpreter’,’latex’)
set(gca,’yscale’,’log’,’xscale’,’log’)
% plot power spectrum (power vs. frequency [1/Angstroms])
figure;
plot(f,p);
xlabel(‘$f [AA^{-1}]$’,’interpreter’,’latex’)
ylabel(‘Power’,’interpreter’,’latex’)
set(gca,’yscale’,’log’,’xscale’,’log’)I’m working on analyzing some data from a grain boundary in an atomic simulation; the included file has the relevant variables. I’ve got a lot of somewhat similar data to go through and am trying to determine a reliable way to get the amplitude of my data. There are a few complications that make the different tools I’m using difficult:
The x-axis location sometimes shifts forward and backwards, but usually by negligible amounts. My included code sorts it to be ascending simply because many solutions require it, but an implementation that doesn’t need to sort would reduce error.
The data has noise that make a lot of "false peaks" and "false valleys" that play havoc on using a simple findpeak function. Unfortunately, the sample rate for my data isn’t high enough to make this easy. Perhaps leveraging the periodic behavior of the signal could help?
My attempts to smooth out the noise with a filter drastically reduce the amplitude, when that is the variable I am trying to study. I’ve been using a 2nd order savitzky-golay filter via the sgolayfilt() command, but I do not know if that is the best fit for this work.
I have very little experience with signal processing, and only somewhat more with MatLab. I think a fourier decomposition and then reconstructing the signal would be my next best option, but after plotting the power spectrum and deciding that somewhere around 0.36 angstroms would be a good cutoff I’m not sure how to proceed. I feel like this would get an accurate periodicity, and then perhaps I could use a combination of movmean with movmax and movmin to get the original amplitude. It isn’t yet clear if the periodicity varies slightly.
The following code plots the power spectrum and frequency, then the actual data (sorted along x-axis).
%% Load data
Temp = ’10’;
fileName = [‘powerDump’, Temp, ‘.mat’];
load(fileName);
%% Sort data by position
[~,sortID] = sort(newGBLocation);
%% compute power spectrum
% pspectrum expects increasing second argument, but it moves erratically in
% the negative Z-direction and needs sorting
[p,f] = pspectrum(newPEAverage(sortID),newGBLocation(sortID)-min(newGBLocation));
% plot energy vs. position data [Angstroms]
figure
plot(newGBLocation(sortID)-min(newGBLocation),newPEAverage(sortID),’r-‘)
xlabel(‘Position $[AA]$’,’interpreter’,’latex’)
ylabel(‘Potential Energy [eV]’,’interpreter’,’latex’)
% plot power vs. wavelength [Angstroms]
figure;
plot(1./f,p);
xlabel(‘$lambda [AA]$’,’interpreter’,’latex’)
ylabel(‘Power’,’interpreter’,’latex’)
set(gca,’yscale’,’log’,’xscale’,’log’)
% plot power spectrum (power vs. frequency [1/Angstroms])
figure;
plot(f,p);
xlabel(‘$f [AA^{-1}]$’,’interpreter’,’latex’)
ylabel(‘Power’,’interpreter’,’latex’)
set(gca,’yscale’,’log’,’xscale’,’log’) I’m working on analyzing some data from a grain boundary in an atomic simulation; the included file has the relevant variables. I’ve got a lot of somewhat similar data to go through and am trying to determine a reliable way to get the amplitude of my data. There are a few complications that make the different tools I’m using difficult:
The x-axis location sometimes shifts forward and backwards, but usually by negligible amounts. My included code sorts it to be ascending simply because many solutions require it, but an implementation that doesn’t need to sort would reduce error.
The data has noise that make a lot of "false peaks" and "false valleys" that play havoc on using a simple findpeak function. Unfortunately, the sample rate for my data isn’t high enough to make this easy. Perhaps leveraging the periodic behavior of the signal could help?
My attempts to smooth out the noise with a filter drastically reduce the amplitude, when that is the variable I am trying to study. I’ve been using a 2nd order savitzky-golay filter via the sgolayfilt() command, but I do not know if that is the best fit for this work.
I have very little experience with signal processing, and only somewhat more with MatLab. I think a fourier decomposition and then reconstructing the signal would be my next best option, but after plotting the power spectrum and deciding that somewhere around 0.36 angstroms would be a good cutoff I’m not sure how to proceed. I feel like this would get an accurate periodicity, and then perhaps I could use a combination of movmean with movmax and movmin to get the original amplitude. It isn’t yet clear if the periodicity varies slightly.
The following code plots the power spectrum and frequency, then the actual data (sorted along x-axis).
%% Load data
Temp = ’10’;
fileName = [‘powerDump’, Temp, ‘.mat’];
load(fileName);
%% Sort data by position
[~,sortID] = sort(newGBLocation);
%% compute power spectrum
% pspectrum expects increasing second argument, but it moves erratically in
% the negative Z-direction and needs sorting
[p,f] = pspectrum(newPEAverage(sortID),newGBLocation(sortID)-min(newGBLocation));
% plot energy vs. position data [Angstroms]
figure
plot(newGBLocation(sortID)-min(newGBLocation),newPEAverage(sortID),’r-‘)
xlabel(‘Position $[AA]$’,’interpreter’,’latex’)
ylabel(‘Potential Energy [eV]’,’interpreter’,’latex’)
% plot power vs. wavelength [Angstroms]
figure;
plot(1./f,p);
xlabel(‘$lambda [AA]$’,’interpreter’,’latex’)
ylabel(‘Power’,’interpreter’,’latex’)
set(gca,’yscale’,’log’,’xscale’,’log’)
% plot power spectrum (power vs. frequency [1/Angstroms])
figure;
plot(f,p);
xlabel(‘$f [AA^{-1}]$’,’interpreter’,’latex’)
ylabel(‘Power’,’interpreter’,’latex’)
set(gca,’yscale’,’log’,’xscale’,’log’) signal processing, fft MATLAB Answers — New Questions
Matlab Coder, Compiler can’t find “tmwtypes.h”
Hello,
I got Matlab Code from the Neural Net Pattern Recognition Toolbox and I tried to generate C++ Code with the Matlab Coder.
But when I select Static Library or Source Code, Atmel AVR(8-bit) as Device (for Arduino) and the Arduino AVR toolchain the Arduino IDE always returns:
sketchgenerated_codeinterface_coder_NeuralNetwork_api.c:12:22: fatal error: tmwtypes.h: No such file or directory
#include "tmwtypes.h"
Why didn’t the Matlab Coder create that Library?Hello,
I got Matlab Code from the Neural Net Pattern Recognition Toolbox and I tried to generate C++ Code with the Matlab Coder.
But when I select Static Library or Source Code, Atmel AVR(8-bit) as Device (for Arduino) and the Arduino AVR toolchain the Arduino IDE always returns:
sketchgenerated_codeinterface_coder_NeuralNetwork_api.c:12:22: fatal error: tmwtypes.h: No such file or directory
#include "tmwtypes.h"
Why didn’t the Matlab Coder create that Library? Hello,
I got Matlab Code from the Neural Net Pattern Recognition Toolbox and I tried to generate C++ Code with the Matlab Coder.
But when I select Static Library or Source Code, Atmel AVR(8-bit) as Device (for Arduino) and the Arduino AVR toolchain the Arduino IDE always returns:
sketchgenerated_codeinterface_coder_NeuralNetwork_api.c:12:22: fatal error: tmwtypes.h: No such file or directory
#include "tmwtypes.h"
Why didn’t the Matlab Coder create that Library? maltab coder, tmwtypes.h, arduino MATLAB Answers — New Questions
need install function rrefmovie
Hello. How can i get function rrefmovie for my MatLab 2009?Hello. How can i get function rrefmovie for my MatLab 2009? Hello. How can i get function rrefmovie for my MatLab 2009? rrefmovie MATLAB Answers — New Questions
Unplanned Outage?
Hi Lab Services team,
Are there any updates I can share with my affected users? Students have assignments due tomorrow (Monday 13/05, Australia East) and I’m having to tell the subject coordinators that they won’t be able to hand them in. What are your current theories about the cause or estimates for a timeline?
Hi Lab Services team, Are there any updates I can share with my affected users? Students have assignments due tomorrow (Monday 13/05, Australia East) and I’m having to tell the subject coordinators that they won’t be able to hand them in. What are your current theories about the cause or estimates for a timeline? Read More
PC Frequently Frozen with GPU Acceleration
If i use use the graphic acceleration when available option in Chrome browser, my pc randomly freezes, when i download a file with chrome if this option enabled pc runs very slow and feels laggy.
It didn’t happen before. I cant fix it for a long time.
If i use use the graphic acceleration when available option in Chrome browser, my pc randomly freezes, when i download a file with chrome if this option enabled pc runs very slow and feels laggy. It didn’t happen before. I cant fix it for a long time. Read More
MATLAB does not start on OS X Sonoma M2 Max
MATLAB 2016b does not start since I upgraded OS X to Sonoma (OS X 14). I use a Mac with a M2 Max architecture. Befor upgrading to Sonoma it worked just fine. I know, that 2016b is not officially supported but maybe someone has an idea how I can fix this issue. I guess it should be possible because it war runnig just fine on the same machine before upgrading to Sonoma.
Trying to start Matlab with /Applications/MATLAB_R2016b.app/bin/matlab -glnxa64 gives the following error:
Warning: Cannot locate Java Runtime Environment (JRE) . . .
1. Either a correct JRE was not available for redistribution when
this release was shipped, in which case you should refer to the
Release Notes for additional information about how to get it.
2. Or you have tried to use the MATLAB_JAVA environment variable
to specify an alternate JRE, but MATLAB cannot find it. Please
run ‘matlab -n’ to determine what value you are using for
MATLAB_JAVA and fix accordingly.
—————————————————————————
matlab: No MATLAB bin directory for this machine architecture.
ARCH = glnxa64
Thank you and best regards,
PeterMATLAB 2016b does not start since I upgraded OS X to Sonoma (OS X 14). I use a Mac with a M2 Max architecture. Befor upgrading to Sonoma it worked just fine. I know, that 2016b is not officially supported but maybe someone has an idea how I can fix this issue. I guess it should be possible because it war runnig just fine on the same machine before upgrading to Sonoma.
Trying to start Matlab with /Applications/MATLAB_R2016b.app/bin/matlab -glnxa64 gives the following error:
Warning: Cannot locate Java Runtime Environment (JRE) . . .
1. Either a correct JRE was not available for redistribution when
this release was shipped, in which case you should refer to the
Release Notes for additional information about how to get it.
2. Or you have tried to use the MATLAB_JAVA environment variable
to specify an alternate JRE, but MATLAB cannot find it. Please
run ‘matlab -n’ to determine what value you are using for
MATLAB_JAVA and fix accordingly.
—————————————————————————
matlab: No MATLAB bin directory for this machine architecture.
ARCH = glnxa64
Thank you and best regards,
Peter MATLAB 2016b does not start since I upgraded OS X to Sonoma (OS X 14). I use a Mac with a M2 Max architecture. Befor upgrading to Sonoma it worked just fine. I know, that 2016b is not officially supported but maybe someone has an idea how I can fix this issue. I guess it should be possible because it war runnig just fine on the same machine before upgrading to Sonoma.
Trying to start Matlab with /Applications/MATLAB_R2016b.app/bin/matlab -glnxa64 gives the following error:
Warning: Cannot locate Java Runtime Environment (JRE) . . .
1. Either a correct JRE was not available for redistribution when
this release was shipped, in which case you should refer to the
Release Notes for additional information about how to get it.
2. Or you have tried to use the MATLAB_JAVA environment variable
to specify an alternate JRE, but MATLAB cannot find it. Please
run ‘matlab -n’ to determine what value you are using for
MATLAB_JAVA and fix accordingly.
—————————————————————————
matlab: No MATLAB bin directory for this machine architecture.
ARCH = glnxa64
Thank you and best regards,
Peter sonoma MATLAB Answers — New Questions
Why not in Intune
So I built a fresh windows 10 machine and when logging in for the first time i used my corporate login. My machine shows up in devices in Entra and not in Intune. i would expect an added machine be enrolled in intune automatically.
What did i miss?
So I built a fresh windows 10 machine and when logging in for the first time i used my corporate login. My machine shows up in devices in Entra and not in Intune. i would expect an added machine be enrolled in intune automatically. What did i miss? Read More
I need help with Avery note card 3379 template in word
I don’t know how to do a front and then inside of a note card template 3379 Avery
I don’t know how to do a front and then inside of a note card template 3379 Avery Read More
Trouble Uploading Excel Add In [Urgent]
Hi, I am working on a startup with my cofounder and we are having user testing very soon and need the add-in in the store. I have been trying for a couple days now to find out how to upload our excel add-in to the AppSource store for others to use.
I have been following this https://learn.microsoft.com/en-us/office/dev/add-ins/publish/publish, and have tried calling a few times to Microsoft support in which I was directed to post here.
I am stuck on this screen,
I have tried windows and xbox selection, in which I paid $20 for the individual creator and from there I am unable to find where to upload the add-in.
I also see the “To enroll in one of the following programs Sign in again using your work account.” Every time I click sign in, it signs me out of my work account, and then prompts me to sign back in, in which it just takes me back to this screen.
Can someone please help me find the right place and steps to upload my excel add-in for approval?
Thanks
Bjorn
Hi, I am working on a startup with my cofounder and we are having user testing very soon and need the add-in in the store. I have been trying for a couple days now to find out how to upload our excel add-in to the AppSource store for others to use. I have been following this https://learn.microsoft.com/en-us/office/dev/add-ins/publish/publish, and have tried calling a few times to Microsoft support in which I was directed to post here.I am stuck on this screen, I have tried windows and xbox selection, in which I paid $20 for the individual creator and from there I am unable to find where to upload the add-in. I also see the “To enroll in one of the following programs Sign in again using your work account.” Every time I click sign in, it signs me out of my work account, and then prompts me to sign back in, in which it just takes me back to this screen. Can someone please help me find the right place and steps to upload my excel add-in for approval? Thanks Bjorn Read More
How can an ancient skull fossil be simulated?
I am a university professor of paleontology at the University of Florida, and I am working on scientific research on the physiological changes that could occur in an ancient skull that has been 5,000 years old, so that a natural simulation can be created, such as a three-dimensional spatial model that can explain the buried landmarks, the positions of the plasma inside the skull, and the protrusions that could be present in it. Realistic, as if it were real, so that after it is simulated, it is animated in space, rotating around the axis of the skull 360 degrees, and showing the jaw bones and orthodontics to complete the research work after completing the model.I am a university professor of paleontology at the University of Florida, and I am working on scientific research on the physiological changes that could occur in an ancient skull that has been 5,000 years old, so that a natural simulation can be created, such as a three-dimensional spatial model that can explain the buried landmarks, the positions of the plasma inside the skull, and the protrusions that could be present in it. Realistic, as if it were real, so that after it is simulated, it is animated in space, rotating around the axis of the skull 360 degrees, and showing the jaw bones and orthodontics to complete the research work after completing the model. I am a university professor of paleontology at the University of Florida, and I am working on scientific research on the physiological changes that could occur in an ancient skull that has been 5,000 years old, so that a natural simulation can be created, such as a three-dimensional spatial model that can explain the buried landmarks, the positions of the plasma inside the skull, and the protrusions that could be present in it. Realistic, as if it were real, so that after it is simulated, it is animated in space, rotating around the axis of the skull 360 degrees, and showing the jaw bones and orthodontics to complete the research work after completing the model. skull fossil be simulated MATLAB Answers — New Questions
How to recover the original signal using ifft
Hello everyone,
I’ve written a code to test the ifft function in MATLAB. However, I’ve noticed that ifft returns the same number of points as fft. I’m aiming to recover the original signal, which had 1000 points along with the time vector, t. How can I achieve this?
Thanks in advance for your help!
clear;clc;close all;
dt=2.5e-9;
f = 10e6;
Nfft=8*4096;
t = (0:1000-1)*dt;
sinal = sin(2*pi*f*t);
figure(1)
plot(t,sinal)
%Cálculo da fft
fftsinal=fft(sinal,Nfft);
%Transformada inversa de Fourier
sinal_recuperado = real(ifft(fftsinal,Nfft));
figure(2)
plot(1:Nfft,sinal_recuperado);Hello everyone,
I’ve written a code to test the ifft function in MATLAB. However, I’ve noticed that ifft returns the same number of points as fft. I’m aiming to recover the original signal, which had 1000 points along with the time vector, t. How can I achieve this?
Thanks in advance for your help!
clear;clc;close all;
dt=2.5e-9;
f = 10e6;
Nfft=8*4096;
t = (0:1000-1)*dt;
sinal = sin(2*pi*f*t);
figure(1)
plot(t,sinal)
%Cálculo da fft
fftsinal=fft(sinal,Nfft);
%Transformada inversa de Fourier
sinal_recuperado = real(ifft(fftsinal,Nfft));
figure(2)
plot(1:Nfft,sinal_recuperado); Hello everyone,
I’ve written a code to test the ifft function in MATLAB. However, I’ve noticed that ifft returns the same number of points as fft. I’m aiming to recover the original signal, which had 1000 points along with the time vector, t. How can I achieve this?
Thanks in advance for your help!
clear;clc;close all;
dt=2.5e-9;
f = 10e6;
Nfft=8*4096;
t = (0:1000-1)*dt;
sinal = sin(2*pi*f*t);
figure(1)
plot(t,sinal)
%Cálculo da fft
fftsinal=fft(sinal,Nfft);
%Transformada inversa de Fourier
sinal_recuperado = real(ifft(fftsinal,Nfft));
figure(2)
plot(1:Nfft,sinal_recuperado); signal recovery MATLAB Answers — New Questions
How to find pixels aligned along a certain direction on satellite image?
Hi everyone.
I need some help.
This image represents all the hot pixels recognized in a certain period of time by analysis of sentinel-2. As you see on the left there are many anomalous pixels that are not actually really hot, but are recognized as anomalous because of the seam/stripes artifact effect in the sentinel-2 images.
I need to eliminate these pixels. Is there an automatic way to recognize pixels aligned in a certain direction, and/or to recognize automatically those pixels on the left part of the image?
Thanks!Hi everyone.
I need some help.
This image represents all the hot pixels recognized in a certain period of time by analysis of sentinel-2. As you see on the left there are many anomalous pixels that are not actually really hot, but are recognized as anomalous because of the seam/stripes artifact effect in the sentinel-2 images.
I need to eliminate these pixels. Is there an automatic way to recognize pixels aligned in a certain direction, and/or to recognize automatically those pixels on the left part of the image?
Thanks! Hi everyone.
I need some help.
This image represents all the hot pixels recognized in a certain period of time by analysis of sentinel-2. As you see on the left there are many anomalous pixels that are not actually really hot, but are recognized as anomalous because of the seam/stripes artifact effect in the sentinel-2 images.
I need to eliminate these pixels. Is there an automatic way to recognize pixels aligned in a certain direction, and/or to recognize automatically those pixels on the left part of the image?
Thanks! pixel, line, sentinel-2, satellite MATLAB Answers — New Questions
Cross-correlation in frequency domain and xcorr2 in MATLAB
What are the reasons for the differences between my frequency domain cross-correlation results and those obtained using the xcorr2() function in MATLAB? Is it possible that xcorr2() performs spatial domain cross-correlation, and how might this affect the results?
img1 = imread(‘1.jpg’);
img2 = imread(‘2.jpg’);
img1_gray = rgb2gray(img1);
img2_gray = rgb2gray(img2);
[m, n] = size(img1_gray);
[p, q] = size(img2_gray);
fft_img1 = fft2(img1_gray, m + p – 1, n + q – 1);
fft_img2 = fft2(img2_gray, m + p – 1, n + q – 1);
cross_correlation = (fft_img1 .* conj(fft_img2));
cross_correlation = ifft2(cross_correlation);
cross_correlation = fftshift(cross_correlation);
cross_correlation_xcorr2 = xcorr2(img2_gray, img1_gray);
figure;
subplot(2, 1, 1);
imshow(cross_correlation, []);
title(‘Custom Cross-Correlation’);
subplot(2, 1, 2);
imshow(cross_correlation_xcorr2, []);
title(‘xcorr2’);
Results:What are the reasons for the differences between my frequency domain cross-correlation results and those obtained using the xcorr2() function in MATLAB? Is it possible that xcorr2() performs spatial domain cross-correlation, and how might this affect the results?
img1 = imread(‘1.jpg’);
img2 = imread(‘2.jpg’);
img1_gray = rgb2gray(img1);
img2_gray = rgb2gray(img2);
[m, n] = size(img1_gray);
[p, q] = size(img2_gray);
fft_img1 = fft2(img1_gray, m + p – 1, n + q – 1);
fft_img2 = fft2(img2_gray, m + p – 1, n + q – 1);
cross_correlation = (fft_img1 .* conj(fft_img2));
cross_correlation = ifft2(cross_correlation);
cross_correlation = fftshift(cross_correlation);
cross_correlation_xcorr2 = xcorr2(img2_gray, img1_gray);
figure;
subplot(2, 1, 1);
imshow(cross_correlation, []);
title(‘Custom Cross-Correlation’);
subplot(2, 1, 2);
imshow(cross_correlation_xcorr2, []);
title(‘xcorr2’);
Results: What are the reasons for the differences between my frequency domain cross-correlation results and those obtained using the xcorr2() function in MATLAB? Is it possible that xcorr2() performs spatial domain cross-correlation, and how might this affect the results?
img1 = imread(‘1.jpg’);
img2 = imread(‘2.jpg’);
img1_gray = rgb2gray(img1);
img2_gray = rgb2gray(img2);
[m, n] = size(img1_gray);
[p, q] = size(img2_gray);
fft_img1 = fft2(img1_gray, m + p – 1, n + q – 1);
fft_img2 = fft2(img2_gray, m + p – 1, n + q – 1);
cross_correlation = (fft_img1 .* conj(fft_img2));
cross_correlation = ifft2(cross_correlation);
cross_correlation = fftshift(cross_correlation);
cross_correlation_xcorr2 = xcorr2(img2_gray, img1_gray);
figure;
subplot(2, 1, 1);
imshow(cross_correlation, []);
title(‘Custom Cross-Correlation’);
subplot(2, 1, 2);
imshow(cross_correlation_xcorr2, []);
title(‘xcorr2’);
Results: matlab, digital image processing MATLAB Answers — New Questions
formula to count the number of cells including the one which repeats itself
Good evening.
I would be very grateful if anyone could help with the below.
With regards the file attached.
you will see that column J has numerous numbers in said column.
is there a formula that will compare the first number in column J, against all the others down the column, one by one, until it finds a number that repeats itself with any of the above, it then tallys the amount of numbers in total including that which has repeated itself, and display this beside the last number that repeated itself in column K, and then carries on down the column doing the same thing over and over again until it gets to the end of the said column.
Just in case i have not explained myself properly. if you look at column K, in the attached file maybe it is self explanatory what i would like to do.
any help is greatly appreciated.
many thanks all
Terence MARTINEZ
Good evening. I would be very grateful if anyone could help with the below. With regards the file attached. you will see that column J has numerous numbers in said column. is there a formula that will compare the first number in column J, against all the others down the column, one by one, until it finds a number that repeats itself with any of the above, it then tallys the amount of numbers in total including that which has repeated itself, and display this beside the last number that repeated itself in column K, and then carries on down the column doing the same thing over and over again until it gets to the end of the said column. Just in case i have not explained myself properly. if you look at column K, in the attached file maybe it is self explanatory what i would like to do. any help is greatly appreciated. many thanks all Terence MARTINEZ Read More
how to simulate communication channel in control toolbox
Is there a way to simulate a communication channel in a simulink like the one shown below, using some block like the BSC or the AWGN channel, in order to simulate an error produced directly by the communication channel being used. I need it to be an element that can be easily incorporated, since it is to perform simulation activities in a classroom.
ThanksIs there a way to simulate a communication channel in a simulink like the one shown below, using some block like the BSC or the AWGN channel, in order to simulate an error produced directly by the communication channel being used. I need it to be an element that can be easily incorporated, since it is to perform simulation activities in a classroom.
Thanks Is there a way to simulate a communication channel in a simulink like the one shown below, using some block like the BSC or the AWGN channel, in order to simulate an error produced directly by the communication channel being used. I need it to be an element that can be easily incorporated, since it is to perform simulation activities in a classroom.
Thanks communication, control toolbox MATLAB Answers — New Questions
how to delete nan values from array columns without losing data from other columns
i have a huge file from a lab expremient
every run gives me 4 columns and every 2 out of the 4 start with nan then 2 nan vars and end with nan and 3 nan vars i want to delet the nan values without losing any data so that when i try to make graphs from it every graph will have enough inputs and neither of them get lost
i am espisally troubled by the second 2 columns of every 4 and how to deal with themi have a huge file from a lab expremient
every run gives me 4 columns and every 2 out of the 4 start with nan then 2 nan vars and end with nan and 3 nan vars i want to delet the nan values without losing any data so that when i try to make graphs from it every graph will have enough inputs and neither of them get lost
i am espisally troubled by the second 2 columns of every 4 and how to deal with them i have a huge file from a lab expremient
every run gives me 4 columns and every 2 out of the 4 start with nan then 2 nan vars and end with nan and 3 nan vars i want to delet the nan values without losing any data so that when i try to make graphs from it every graph will have enough inputs and neither of them get lost
i am espisally troubled by the second 2 columns of every 4 and how to deal with them data, import, nan MATLAB Answers — New Questions