自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 【Matlab】2-D Lookup Table 导入Excel数据 简单教程

文章目录前言一、主要思路二、使用步骤1.将excel数据导入matlab工作区2.创建LookupTable类型的变量并读入数据3.在2-D Lookup Table模块里使用工作区变量总结完整代码本文参考:https://zhuanlan.zhihu.com/p/298263533前言今天在做逆发动机模型的建立时,碰到一个问题,需要将二维的Excel数据表导入Matlab simulink中的2-D Lookup Table模块进行使用,而查阅了网上的资料都没有找到合适的教程,这里我结合一些资

2022-04-17 15:50:08 12518 22

原创 Tree Traversals Again(C语言、不建树)

An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered from 1 to 6) is traversed, the stack operations are: push(1); push(2); push(3); pop();

2021-12-07 17:33:40 675

原创 树2 List Leaves(C语言)

List LeavesGiven a tree, you are supposed to list all the leaves in the order of top down, and left to right.给一个棵树,期望你能从上到下从左到右列出所有叶结点Input Specification:Each input file contains one test case. For each case, the first line gives a positive integer N (

2021-12-01 10:31:13 896

原创 线性结构4 Pop Sequence(C语言)

题目来源:中国大学MOOC——陈越、何钦铭-数据结构课后作业02-线性结构4 Pop SequencePop SequenceGiven a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequen

2021-11-14 15:06:19 589

原创 数组元素循环右移问题

题目内容一个数组A中存有N(>0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移M(≥0)个位置,即将A中的数据由(A 0 A 1​ ⋯A N−1)变换为(A N−M ⋯A N−1​ A 0​ A 1​ ⋯A N−M−1​)(最后M个数循环移至最前面的M个位置)。如果需要考虑程序移动数据的次数尽量少,要如何设计移动的方法?输入格式:每个输入包含一个测试用例,第1行输入N(1≤N≤100)和M(≥0);第2行输入N个整数,之间用空格分隔。输出格式:在一行中输出循环右移M位以后的整数

2021-11-05 20:01:10 46

原创 素数对猜想(C语言)

素数对猜想(C语言实现)题目如下代码如下:#include<stdio.h> #include<math.h>int prime(int n){ int i; if(n<=2) return 1; else{ for(i=2;i<=(sqrt(n));i++){ if (n % i == 0) return 0; } return 1; }}int main(){ int N,j,tmp=0,count=0;

2021-11-03 16:18:11 3631 3

原创 Maximum Subsequence Sum

Maximum Subsequence Sum题目详情 最大和子序列根据陈越姥姥课上讲解的思路编写如下程序#include<stdio.h>int main(){ int N,i; scanf("%d",&N); int a[N]; for(i=0;i<N;i++){ scanf("%d",&a[i]); } int maxsum,thissum,first_index,last_index,tmp_first_index; maxsum=-1

2021-11-02 18:12:13 74

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除