File: test_write_struct_complex_2d_numeric.m

package info (click to toggle)
libmatio 1.5.29-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,648 kB
  • sloc: sh: 126,066; ansic: 22,606; makefile: 646; python: 215
file content (21 lines) | stat: -rw-r--r-- 780 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
try
    load test_write_struct_complex_2d_numeric.mat
    expdata(1).field1 = cast(reshape((1:12) + j*(51:62),3,4),type);
    expdata(1).field2 = cast(reshape((13:24) + j*(63:74),3,4),type);
    expdata(2).field1 = cast(reshape((25:36) + j*(75:86),3,4),type);
    expdata(2).field2 = cast(reshape((37:48) + j*(87:98),3,4),type);
    pass = true;
    pass = pass && isequal(a,expdata(:));
    pass = pass && strcmp(class(a(1).field1),class(expdata(1).field1));
    pass = pass && strcmp(class(a(1).field2),class(expdata(1).field2));
    pass = pass && strcmp(class(a(2).field1),class(expdata(2).field1));
    pass = pass && strcmp(class(a(2).field2),class(expdata(2).field2));
catch me
    pass = false;
end
if pass
    fprintf('PASSED\n');
else
    fprintf('FAILED\n');
end
exit;