学习编程的七大忌讳

1 不会英语:CS源于美国,重量级的文档都是英文的。不会英语,那么你只能忍受拙
劣的翻译和大延迟的文档(翻译出来的文档几乎都是很久以前出版的东西)。

2 急于求成:什么都没学习就开始编程是最大的忌讳。写C++程序语法都能错,数据
结构连线性表都不知道,数据库不知道关系模型,TCP编程不知道socket,还是先坐下来学习几年再说(如果说工作急需,我只能说:早干嘛去了)

3 过于好问:勤学好问是一种很好的品质,但是如果把勤学丢了,只留下好问,就是一个恶劣的素质了。事无巨细都去请教别人,一则会让人厌烦,二则由于没有系统学习过程,也是不可能学习好的。

4 只会艳羡别人和说别人不该拿那么多钱,而自己却收入微薄:老实说,绝大多数情况下,收入的高低和你的水平是有正相关关系的。不是否认有关系的存在,但是绝对不会10个人中9个人有关系而独独你没有。少抱怨一些多学习一些,提升自己才是最重要的。

5 过于不求甚解和过于求甚解。了解为什么是很重要的,但是要学习的东西很多,如果什么都弄明白,那么估计头发白了还没有找到所有答案。当然如果什么都不想细致了解,那么只能去做蓝领了。

6 过分崇拜他人:我想信很多人都是很厉害的,值得大家崇拜,但是如果过于崇拜,把他们的话当成圣经就没有必要了。你需要突破他们,而不是崇拜他们。

7 不想吃苦:IT业高收入和高竞争是联系在一起的。没有付出永远别想进步。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
下面是一个基于MATLAB的禁忌搜索算法实现示例,用于大规模MIMO导频分配问题: ```matlab function [best_sequence, best_cost] = taboo_search(num_antennas, num_pilots, max_iterations) % Initialize a random pilot sequence current_sequence = randperm(num_antennas, num_pilots); % Initialize the taboo list taboo_list = zeros(num_antennas, num_antennas); taboo_duration = 10; % Set the current cost to infinity current_cost = Inf; % Set the best cost to infinity and the best sequence to an empty array best_cost = Inf; best_sequence = []; % Start the iterations for i = 1:max_iterations % Calculate the cost of the current sequence current_cost = calculate_cost(current_sequence); % Generate all possible neighbor sequences neighbor_sequences = generate_neighbors(current_sequence); % Calculate the cost of each neighbor sequence neighbor_costs = zeros(size(neighbor_sequences, 1), 1); for j = 1:size(neighbor_sequences, 1) neighbor_costs(j) = calculate_cost(neighbor_sequences(j, :)); end % Choose the neighbor sequence with the lowest cost that is not in the taboo list [best_neighbor_cost, best_neighbor_index] = min(neighbor_costs); best_neighbor_sequence = neighbor_sequences(best_neighbor_index, :); while taboo_list(current_sequence(best_neighbor_index), best_neighbor_sequence(best_neighbor_index)) > 0 neighbor_costs(best_neighbor_index) = Inf; [best_neighbor_cost, best_neighbor_index] = min(neighbor_costs); best_neighbor_sequence = neighbor_sequences(best_neighbor_index, :); end % Update the taboo list taboo_list(current_sequence(best_neighbor_index), best_neighbor_sequence(best_neighbor_index)) = taboo_duration; taboo_list = taboo_list - 1; taboo_list(taboo_list < 0) = 0; % Set the current sequence to the best neighbor sequence current_sequence = best_neighbor_sequence; % Update the best sequence if necessary if best_neighbor_cost < best_cost best_cost = best_neighbor_cost; best_sequence = best_neighbor_sequence; end end end function cost = calculate_cost(sequence) % Calculate the cost of a pilot sequence % Here we just use the sum of the absolute values of the difference between adjacent pilots cost = sum(abs(diff(sequence))); end function neighbors = generate_neighbors(sequence) % Generate all possible neighbor sequences % Here we just swap each pair of adjacent pilots neighbors = zeros(length(sequence) - 1, length(sequence)); for i = 1:length(sequence) - 1 neighbor = sequence; neighbor(i) = sequence(i + 1); neighbor(i + 1) = sequence(i); neighbors(i, :) = neighbor; end end ``` 在这个示例中,calculate_cost函数用于计算导频序列的误差向量范数,generate_neighbors函数用于生成所有可能的邻居序列。禁忌列表用一个矩阵来表示,taboo_list(i, j)表示在第i个位置使用j作为导频序列时,禁忌的时间还剩多少。在每次更新禁忌列表时,所有时间都减1,并把小于0的项设为0。最后,禁忌列表用于避免选择已经禁忌的导频序列。 使用这个禁忌搜索算法可以得到一个较优的导频序列,以提高大规模MIMO系统的信号传输质量和可靠性。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值