how to define class for basic functions like disp, load save
1 次查看(过去 30 天)
显示 更早的评论
i am calling classdef in a program and once called basic functions like disp, save, load does ot work. do i need to define any class for them. pl. guide
7 个评论
回答(2 个)
Matt J
2014-1-26
编辑:Matt J
2014-1-26
When I run your code, I have no problem displaying invoking the default disp.
>> obj=vrt_gen; disp(obj)
vrt_gen with properties:
hdr: []
trailer: []
word0: []
psize: []
stream: 0
int_ts: []
frac_ts_0: []
frac_ts_1: []
count: []
nSamples: []
nPkts: []
pkt: []
pkts: []
payload: []
lpf: []
symbols: []
dsymbols: []
M: []
N: []
fs: []
ts: []
fc: []
time: []
upsample: []
mixed: []
filt_y: []
filt_t: []
filt_type: []
filt_beta: []
filt_Fd: []
filt_Fs: []
scheme: []
h: []
g: []
filtered_sig: []
What is the full path to your main_file.m?
0 个评论
Image Analyst
2014-1-26
You don't have any methods in your class. And disp() doesn't even appear anywhere in the file. No, you do not need a class to use disp, save, and load. You can use them just by themselves. Not sure what you're doing tor attempting to do.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!