Why can't I get any .m file to work in octave? - octave

I am desperately trying to run octave in a VirtualBox of Ubuntu 12.04. I have made a file called ANGRY.m which has lines as follows:
%How badly does octave suck?
OCTAVESUCKS=5
That is it. When I try to run it (i.e. enter ANGRY into the command line I get this error message:
error: `ANRGY' undefined near line 1 column 1
I've had things running better than this in octave and have absolutely no clue why it is doing this or how to fix it or how to go about trying to search for what is wrong. I am sorry I cannot be more helpful. But I really can't. Please aim any answer at a total moron. I'm really not a programmer.

You misspelled ANGRY when you put it into the terminal...

Do you see your file ANGRY.m when you type
ls
in Octave? Check the working dir with "pwd"!

Related

"/usr/bin/google-chrome" is not an ELF file

I am going to use ltrace for some applications like chrome but when I use it, I receive the following error message.
"/usr/bin/google-chrome" is not an ELF file
Does anybody know about the solution? I want to know what functions are exactly called by running an application.
Thanks,
Does anybody know about the solution?
file -L /usr/bin/google-chrome
/usr/bin/google-chrome: Bourne-Again shell script, ASCII text executable
This tells you that google-chrome is a shell script. If you look inside, you'll see that it eventually invokes a real ELF binary (/opt/google/chrome/chrome on my system).
I want to know what functions are exactly called by running an application.
The ltrace command will not show you that. It will only show you what external functions are getting called.

How do I run an R script from within RStudio's built-in R console?

I'm assuming it's like Python's import statement, but I'd like a quick answer, since I'm in the middle of an introduction class right now.
This was the closest I got, but it didn't seem to match the question, as it shows how to run an R Script from the system CLI, not the blue RStudio > prompt:
Run an R-script from command line and store results in subdirectory
Short Answer using source() function
Once you download, install, and open the RStudio, you'll see a part in the lower left with blue greater than symbols >.
In the part of RStudio's GUI with the blue >, enter the following
> setwd('/folder/where/the/file/is/')
> source('file_name')`
...output, if any, appears below...
Example:
Let's assume I have a file at /home/myusername/prj/r/learn_r/insurance_data.r that I want to run.
I would start up RStudio, and enter the following in the little window it has labeled Console:
Annoyingly long answer with screenshots using source() function
Well, it turned out to be much simpler than I expected to run this from RStudio's built-in console. I was surprised that this had not already been asked about RStudio, before. If it has, I guess I'll have a burned question.
Anyway, a little trial and error showed me how to do this:
Yay, output has appeared below.
Make sure to set your working directory, first.
I did this as follows from inside RStudio 1.0.143 on my Ubuntu 16.04 LTS environment:
setwd("~/proj/r/learn_r")
Next, you can enter help(source), you can search for the syntax of the source() function, and you can just type it in to the RStudio console for a prompt:
If you want to run a specific line from the R script, put the cursor somewhere in the line and press command+enter (on other pc I think is ctrl+enter). If you want to run the whole script or some parts, select the part and command+enter.

adt error - "... is not part of a Mac OS X Native Extensions framework"

I'm trying to package some code up as an ANE, something we've done before in house. However we're currently stuck on an ADT error which I can't seem to wrap my head around.
When running the following from a sh file, I'm getting an error.
Shell script:
ADT="/Applications/air/bin/adt"
NAME="VideoRoll"
AFILE="libVideoRollANE.a"
$ADT -package -target ane $NAME.ane extension.xml -swc $NAME.swc -platform iPhone-ARM -platformoptions platformoptions.xml library.swf $AFILE
Error:
platformoptions.xml is not part of a Mac OS X Native Extensions
framework
All of the files are in the correct place and being clearly picked up by adt, as I'd assume there would be something else I'd be getting back. If you're after the source code, it's an open source library on bitbucket that I've forked and made a couple of changes to. I'm trying to compile it with Adobe AIR SDK 20 to try and fix an issue we're getting but I'm struggling to just build it from the base source right now. The source can be found here: https://bitbucket.org/lostirc/videoroll/src .
Any suggestions would be great, I'm up for trying anything now. I've modified nearly everything I can think of and tried various different orders for the command, it seems if I remove the platformoptions flag and value, then it gives the same error about library.swf, so I'm not sure it's directly related to the platformoptions.xml.
I worked around the problem by running the same command on Windows. This isn't really a solution but a potential workaround for anyone having the same issue. If anyone can post a good answer then I'll accept that, but for now this is the best answer I've got.

Mediatek Linkit One Error when compiling in Arduino IDE 1.6.6: arm-none-eabi-g++: no such file or directory

So, as you can see in the title, I am having a problem with my Linkit One. I am using Arduino IDE 1.6.6, and I am using the Linkit One SDK 1.1.17 through the Arduino board's manager. When I compile anything, even a simple bare minimum Arduino program, I get this error:
arm-none-eabi-g++: error: ~My System Path\Temp\build3694385943597424511.tmp/syscalls_mtk.c.o: No such file or directory Error compiling.
I have searched long and hard for an answer to this problem, and I have found nothing. Please inform me if I need to provide extra information.
Thanks, Fiske
I got it to work by editing platform.txt
and adding core/ so that it reads:
{build.path}/core/syscalls_mtk.c.o
instead of
{build.path}/syscalls_mtk.c.o
platform.txt was located in:
/Users/awootton/Library/Arduino15/packages/LinkIt/hardware/arm/1.1.17
Okay: Here is what I did. First of all, I switched to IDE 1.6.5, like you said. Then I followed the tutorial here: https://www.hackster.io/seeyouu/smart-city-bus-network-9f4cb0. FINALLY I got the linkit to work. You have no idea how long that took.
Try v1.6.5 of the ide. Seemed to fix the issue for us!

rectangle function undefined in octave

for some reason, neither the octave terminal, nor my editor recognizes the rectangle-function.
For example, when I try to get the documentation via the help command, I get this:
octave-3.2.4:41> help rectangle
error: help: `rectangle' not found
I'm sure it's an incredibly stupid error, but I just can't find it.
Everything else is working fine.
I appreciate any help!
Hannah