I am getting the followin error when trying to plot in GNU/octave:
octave:22> plot(b(:,2),b(:,4))
error: invalid conversion from real matrix to real scalar
error: __calc_dimensions__: expecting graphics handle as only argument
error: called from:
error: /usr/share/octave/3.6.2/m/plot/private/__go_draw_axes__.m at line 55, column 8
error: /usr/share/octave/3.6.2/m/plot/private/__go_draw_figure__.m at line 167, column 19
error: /usr/share/octave/3.6.2/m/plot/__gnuplot_drawnow__.m at line 86, column 5
octave:23>
The variable b is loaded from a csv file, as follows:
b=csvread("my.csv")
Content of my.csv
1,40.0942,0.775539,18.658
2,40.1882,0.857556,415.677
3,40.2818,0.858294,233.934
4,40.3748,0.887273,348.503
5,40.4669,0.908618,27.0149
6,40.558,0.908496,234.81
7,40.6478,0.911826,58.3943
8,40.7362,0.922848,204.128
9,40.823,0.928547,7.75615
10,40.908,0.920065,0.0654867
Sadly,sometimes the erros happens, others do not. (octave bug?)
Does anyone knows what is going on?
By the way, my systems is: Ubuntu 12.11, octave 3.6.2, Linux kernel 3.5.00-22-generic
Edit:
I think it is a bug. The foregoing error is caused by a plot called after a plotyy. To reproduce the error, execute these commands:
1> b=csvread("my.csv");
2> plot(b(:,2),b(:,4))
3> plotyy(b(:,1),b(:,2),b(:,1),b(:,4))
4> plot(b(:,2),b(:,4))
Related
I use the Linux kernel style in my C code, even though it's not related to the kernel. Running checkpatch.pl produces ERROR: Missing Signed-off-by: line(s). How to ignore it?
To intentionally silence the ERROR: Missing Signed-off-by: line(s) one can pass the --no-signoff parameter, e.g.:
git show | checkpatch.pl --no-tree --no-signoff
This can also be added on a new line to the .checkpatch.conf file to avoid having to type it.
I could use a little hand with utPLSQL.
I am trying to produce the test results so that Sonar would pick it up and scan them. so far, Sonar is picking up the report file, but the test executions are ignored because they are not referencing to the appropriate source files.
I am trying to make a reference to the source and test files when running ut.run(ut_sonar_test_reporter()); and our Jenkins does not have utPLSQL-cli installed. Short version: They said they will not install it.
To get a result for a single test, I tried the following:
spool sonar_results.xml;
exec ut.run('test_get_something');
exec ut.run(ut_sonar_test_reporter(), a_source_file_mapping => ut_file_mappings(ut_file_mapping(file_name => 'this_dir/get_something.fnc', object_owner=> 'GET_SOMETHING_OWNER', object_name=> 'GET_SOMETHING', object_type=>'FUNCTION'));
spool off;
And got the following error message:
Error starting at line : 4 in command -
BEGIN ut.run(ut_sonar_test_reporter(), a_source_file_mapping => ut_file_mappings(ut_file_mapping(file_name => 'this_dir/get_something.fnc', object_owner=> 'GET_SOMETHING_OWNER', object_name=> 'GET_SOMETHING', object_type=>'FUNCTION'));
Error report -
ORA-06550: line 1, column 219:
PLS-00306: wrong number or types of arguments to call to 'RUN'
ORA-06550: line 1, column 219
PL/SQL: Statement ignored
utPLSQL's documentation doesn't provide anything about referencing parameters like a_source_file_mapping or a_test_file_mapping.
I am a little stumped.
when I write an R script in a test.R file
nb <- 22
paste("Etudions le nombre: ",nb)
paste("Le logarithme népérien de ce nombre est: ", log(nb))
paste("La racine carrée de ce nombre est: ", sqrt(nb))
paste("Le cosinus de ce nombre est: ", cos(nb))
paste("Si on ajoute 3 au nombre ", nb, " on obtient: ", nb + 3)
q("ask")
I executed using :
source("/Users/shous/Desktop/Master2.0/LanguageR/test.R")
error message :
Error in source("/Users/shous/Desktop/Master2.0/LanguageR/test.R") :
/Users/shous/Desktop/Master2.0/LanguageR/test.R:1:9: unexpected numeric constant
1: nb <- 22
It can be encoding problem: unexpected numeric constant 1: nb <- 22
I guess you don't want to have this character Â.Try to change file encoding or rewrite problematic line (not copy paste).
unexpected numeric constant 1: nb <- 22
This is R telling you that it found the line
nb <- 22
and that isn't valid syntax. You can duplicate this simply on the command line with something like a = a 22, which also isn't valid syntax. You need to correct that line of code - I don't know what you want it to be, perhaps there is a missing line break, or perhaps it should be  + 22 or Â[22], etc...
The line that produces the error does not occur in the code you show, perhaps you should make sure you are running the right file.
I have a simple Azure Machine Learning experiment, with two input blocks ("Enter Data Manually") that pass their input to an "Execute R Script" block that binds the two inputs.
When the two input values are the same, I get an AFx Library exception FileNotFound. When the two input values are different, everything works fine.
Here is the R code and the experiment outline.
d1 <- maml.mapInputPort(1) # class: data.frame
d2 <- maml.mapInputPort(2) # class: data.frame
print(d1)
print(class(d1))
print(d2)
print(class(d2))
The error I get when I set the same input data in the two input blocks, in more detail is the following:
[Critical] Error: Error 1000: AFx Library library exception: File: ..\..\Dataset2\Dataset2.dataset cannot be found.
[Critical] {"InputParameters":{"DataTable":[{"Rows":2,"Columns":1,"estimatedSize":12001280,"ColumnTypes":
{"System.Int32":1},"IsComplete":true,"Statistics":
{"0":[1.5,1.5,1.0,2.0,0.70710678118654757,2.0,0.0]}}]},"OutputParameters":
[],"ModuleType":"LanguageWorker","ModuleVersion":"
Version=6.0.0.0","AdditionalModuleInfo":"LanguageWorker, Version=6.0.0.0,
Culture=neutral, PublicKeyToken=69c3241e6f0468ca;
Microsoft.MetaAnalytics.LanguageWorker.LanguageWorkerClientRS;
RunRSNR","Errors":"Microsoft.Analytics.Exceptions.ErrorMapping+ModuleException:
Error 1000: AFx Library library exception: File: ..\\..\\Dataset2
\\Dataset2.dataset cannot be found. --->
Microsoft.Numerics.AFxLibraryFileNotFoundException: File: ..\\..\\Dataset2
\\Dataset2.dataset cannot be found.\r\n at
Microsoft.Analytics.IO.Local.DataTableReader..ctor(String filePath)\r\n at
Microsoft.MetaAnalytics.DllModuleHost.DataLab.Handlers.DataTableDatasetHandler.H
andleArgumentString(String argument, ParameterInfo paramInfo)\r\n at
Microsoft.MetaAnalytics.DllModuleHost.ParameterArgumentBinder.InitializeParamete
rValues(MethodInfo method, Dictionary`2 moduleDescription)\r\n at
Microsoft.MetaAnalytics.DllModuleHost.DllModuleMethod.Execute(Dictionary`2
moduleDescription)\r\n at
Microsoft.MetaAnalytics.DllModuleHost.Program.Main(String[] args)\r\n --- End
of inner exception stack trace ---","Warnings":[],"Duration":"00:00:00.5755180"}
Module finished after a runtime of 00:00:01.4722617 with exit code -2
Module failed due to negative exit code of -2
Any suggestion is much appreciated, Flo.
You should get rid of the R code referencing the second dataset because you only have one input dataset.
I am running developmental scientific code. I am stuck on a cryptic error message, and am curious what the OpenMDAO team thinks. When I run the code in serial, it works with no issues. When I run it under mpirun, OpenMDAO throws a cryptic error message:
Traceback (most recent call last):
File "test/exampleOptimizationAEP.py", line 129, in <module>
prob['ratedPower'] = ratedPower
.....
File "/scratch/jquick/test/lib/python2.7/site-packages/openmdao-1.7.3-py2.7.egg/openmdao/core/vec_wrapper.py", line 1316, in __setitem__
(self.name, name))
AttributeError: 'params' has not been initialized, setup() must be called before 'ratedPower' can be accessed
I am not sure how to approach this. There is nothing obviously different about the ratedPower variable in the code. What information does this error give me about what is going wrong?
This is a bug in OpenMDAO <= v1.7.2. Look at the output of check_setup and see the list of parameters without associated unknowns. You will find that variable in there. When running in parallel (because of the bug), you can not set any hanging params (ones without associated unknowns) in your setup script.
The way to fix it is to add an IndepVarComp to any variable you need to initialize the value of.