- 博客(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
14845
24
原创 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
725
原创 树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
951
原创 线性结构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
624
原创 数组元素循环右移问题
题目内容一个数组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
74
原创 素数对猜想(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
4086
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
98
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人