⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interp.c

📁 ngspice又一个电子CAD仿真软件代码.功能更全
💻 C
字号:
/**********Copyright 1990 Regents of the University of California.  All rights reserved.Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********//* * Polynomial interpolation code. */#include "ngspice.h"#include "cpdefs.h"#include "ftedefs.h"#include "dvec.h"#include "interp.h"voidlincopy(struct dvec *ov, double *newscale, int newlen, struct dvec *oldscale){    struct dvec *v;    double *nd;    if (!isreal(ov)) {        fprintf(cp_err, "Warning: %s is not real\n", ov->v_name);        return;    }    if (ov->v_length < oldscale->v_length) {        fprintf(cp_err, "Warning: %s is too short\n", ov->v_name);        return;    }    v = alloc(struct dvec);    v->v_name = copy(ov->v_name);    v->v_type = ov->v_type;    v->v_flags = ov->v_flags;    v->v_flags |= VF_PERMANENT;    v->v_length = newlen;    nd = (double *) tmalloc(newlen * sizeof (double));    if (!ft_interpolate(ov->v_realdata, nd, oldscale->v_realdata,            oldscale->v_length, newscale, newlen, 1)) {        fprintf(cp_err, "Error: can't interpolate %s\n", ov->v_name);        return;    }    v->v_realdata = nd;    vec_new(v);    return;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -