So I have a script that I run j times. The following line produces an error:
[evec(:,:,j), eval(:,:,j)] = eig(T(:,:,j));
Error using mupadmex
Error in MuPAD command: Cannot compute the explicit
representation of the eigenvalues; use
'numeric::eigenvectors'. [linalg::eigenvectors]
Error in sym/mupadmexnout (line 2080)
out = mupadmex(fcn,args{:});
Error in sym/eig (line 68)
[V,D,p] = mupadmexnout('symobj::eigenvectors',A);
Error in SingleLayer (line 86)
[evec(:,:,j), eval(:,:,j)] = eig(T(:,:,j));
That is the error message I get. Am I correct creating 3 "sheets" (not sure how to describe it) like this. I
Related
I am comparing two models using visdiff. I can see the results as a comparison tab. I see options on the GUI to export results in different format.
How do I export these results programmatically?
I am able to export it for non-model files.
But for model files it throws following error:
Subscript indices must either be real positive integers or logicals.
Error in linediff>tokenize (line 153)
cls = tok_class(double(s));
Error in linediff (line 18)
tok1 = tokenize(line1,ignore_whitespace);
Error in textdiff>i_CreateHTML/writeModifiedLine (line 158)
[newline1,newline2] = linediff(line1,line2,showchars,ignore_whitespace);
Error in textdiff>i_CreateHTML (line 464)
writeModifiedLine(line1,a1(n),line2,a2(n));
Error in textdiff (line 42)
htmlOut=i_CreateHTML(source1,text1,readable1, ...
Error in comparisons_private (line 9)
out = textdiff(varargin{:});
Error in visdiff (line 52)
htmlOut = comparisons_private('textdiff',filename1,filename2,showchars);
I use matlab 2018 in Windows 10.
I got an error message in reading avi-File in Matlab.
v = VideoReader('M-Movie_1.avi');
video = read(v);
I got this error-message
Error using VideoReader/read>readFramesUntilEnd (line 229)
Dot indexing is not supported for variables of this type.
Error in VideoReader/read (line 120)
videoFrames = readFramesUntilEnd(obj);
Error in main (line 7)
video = read(v);
any ideas what is going wrong?
I have this code: http://pastebin.com/E70c4UYY
When running, I get the following error:
Error using Diffusivity.getParams
Too many output arguments.
Error in Diffusivity.D_BA (line 63)
[sigmaA, epsK_A] = Diffusivity.getParams(specieA);
Error in Diffusivity.D_Amix (line 95)
Dam = fractionsArray(j) / Diffusivity.D_BA(specieA, fractionsArrayNames_cellstr{j}, T, P);
I do not understand how it can give an error, since in the code, on line 63 and 64 I have specified that there are two outputs?
I fixed it by changing line 9 from [results] = getParams(specie) to [sigma, epsK] = getParams(specie) and then just deleting line 54.
Consider the following foo.m file:
try
disp(r3)
catch ME
disp(getReport(ME))
end
When I run it with:
matlab -nodisplay -nodesktop -nosplash -nojvm -wait -r "run('foo.m')"
I get:
Undefined function or variable 'r3'.
Error in foo (line 2)
disp(r3)
Error in run (line 96)
evalin('caller', [script ';']);
I was wondering if it is possible to display the full path of those files that are referenced in the errors. I know I can use which and, for instance, get:
ยป which run
C:\prog-lang\matlab\toolbox\matlab\lang\run.m
But I would like the errors to be directly displayed like
Error in C:\prog-lang\matlab\toolbox\matlab\lang\run.m (line 96)
rather than
Error in run (line 96)
One option is simply to hack the error report that is returned by getReport, for example using this function to search and replace each instance of "foo" with the full path to the file -
function msg = getReportFull(e)
stack = dbstack();
stack(1) = [];
msg = getReport(e);
for i = 1:length(stack)
fname = stack(i).name;
fpath = which(stack(i).file);
msg = strrep(msg, ['>' fname '<'], ['>' fpath '<']);
end
end
Then with the following code in "foo.m" -
try
disp(r3);
catch e
disp(getReportFull(e));
end
you will observe this error -
>> run('foo.m')
Undefined function or variable 'r3'.
Error in C:\foo.m (line 2)
disp(r3);
Error in C:\Program Files\MATLAB\R2012b\toolbox\matlab\lang\run.m (line 64)
evalin('caller', [script ';']);
This is absolutely an untested hack, and I make no guarantees that it won't break at a really inopportune moment.
I've recently been developing a GUI, which worked fine until Matlab crashed while running an unrelated code. A section of my code which allows a user to draw a ROI no longer works and reports an error with my impoly call (worked perfectly before Matlab crashed):
function cb(src,evt)
handles = guidata(src); %# import the data from the object
images=handles.images;
start = handles.view_slice;
last = handles.slices;
imshow(images(:,:,start),[])
h=impoly;
position = getPosition(h);
The error I now get is:
Error using hittest
Invalid object handle
Error in imshared.ipthittest (line 33)
h = hittest(hFigure, currentPoint);
Error in findLowestManagedObject (line 14)
hit_obj =
imshared.ipthittest(hFigure,buttonMotionEvent.currentPoint);
Error in iptPointerManager>createPointerManager/updatePointer
(line 334)
overMe =
findLowestManagedObject(hFigure,mouseMotionEvent);
Error in
iptPointerManager>createPointerManager/enablePointerManager (line
259)
updatePointer(figHandle, evt);
Error in iptPointerManager (line 72)
pointerManager.API.enable();
Error in manageInteractivePlacement (line 76)
iptPointerManager(h_fig,'Enable');
Error in impoly>impolyAPI (line 245)
placement_aborted =
manageInteractivePlacement(h_axes,h_group,#placePolygon,#buttonUpPlacement);
Error in impoly (line 97)
[h_group,draw_api] = impolyAPI(varargin{:});
Error in volume_scan>cb (line 288)
h=impoly;
Error while evaluating uitoggletool OnCallback
Apart from this not working, there is other weirdness including text stuck in a table on GUIDE (which I cannot remove) and a checkbox text which keeps defaulting to the 3rd option
Anybody got any ideas? Is there a crash file somewhere that needs to be reset/removed? I'm using 2012b.
Thanks, Jim