Define a variable without assigning a value
83 views (last 30 days)
Show older comments
Hi,
I want to create a variable m without assigning it a value, and do a calculation with it, is it possible?
Thnak you in advance,
R
Answers (2)
Matt J
on 24 May 2020
Perhaps you are trying to do symbolic computations,
If so, you need the Symbolic Math Toolbox.
2 Comments
Tadios
on 7 Feb 2024
clc
clear
% close
snr = 20:5:60;
datanum = 10000;
M = 4;
K = [4, 10];
invber = zeros(2,length(snr));
reginvber = zeros(2,length(snr));
for ind1 = 1:1:length(snr)
disp(['Signal to noise ratio: ' num2str(snr(ind1)) ' dB'])
invtransmission
ber = invtransmission(snr, K, datanum);
invber4 = invtransmission(snr(ind1),K(1),datanum);
reginvber4 = reginvtransmission(snr(ind1),K(1),datanum);
invber10 = invtransmission(snr(ind1),K(2),datanum);
reginvber10 = reginvtransmission(snr(ind1),K(2),datanum);
invber(:,ind1) = [invber4; reginvber4];
reginvber(:,ind1) = [invber10; reginvber10];
end
invber;
reginvber;
figure
semilogy(snr,invber(1,:),'r--x','linewidth',1.5)
hold on
semilogy(snr,invber(2,:),'r-d','linewidth',1.5)
semilogy(snr,reginvber(1,:),'b-+','linewidth',1.5)
semilogy(snr,reginvber(2,:),'b-*','linewidth',1.5)
xlabel('rho (dB)');ylabel('BER')
legend('4x4 Channal Inversion','4x4 Regularized Channal Inversion',...
'10x10 Channal Inversion','10x10 Regularized Channal Inversion')
how to fix the problem " invtransmission4 = invtransmission(snr(ind1),K(1),datanum)"
2 Comments
Walter Roberson
on 7 Feb 2024
The line you indicated as having a problem, does not appear in the code posted.
Functions invtransmission and reginvtransmission are not defined.
See Also
Categories
Find more on Assumptions in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!