Problems with adding NetLogo extension for Mac - matlab

I'm having a problem adding the matlab-extension folder previously developed (https://github.com/mbi2gs/netlogo-matlab-extension/wiki) into the net logo extension folder. I think there is some problem with my ability to write into the NetLogo folders. I have tried troubleshooting with erasing and rewriting the drive, and by checking the 'ignore ownership on this volume' in the get info box. But neither of these have helped adding files into NetLogo. My system is macOS Sierra v. 10.12.6 and NetLogo 6.1.1.

At the moment I don't have MatLab installed, but here are a few things you could try.
It looks like you are running NetLogo from inside the disk image (dmg file) it came in. This might work, but generally I'd advise copying the NetLogo 6.1.1 folder out of the disk image into your Applications folder and getting rid of the disk image entirely. You can either open the the NetLogo disk image and the Applications folder at the same time then drag the NetLogo 6.1.1 folder over, or you can select the NetLogo 6.1.1 folder and Command-C to copy then Command-V to paste the folder to the Applications.
The second step is to make you sure you have the matlab folder copied into the extensions folder under the NetLogo 6.1.1 folder, per those MatLab extension directions.
If the Matlab extension does write to the NetLogo folder while it's running, you may have to repeat those steps you tried to give your user read and write access to the NetLogo 6.1.1 folder, too.
Here is a pic of how things look with my NetLogo 6.1.1 folder in the Applications folder and the matlab extension copied in.
If none of that helps, one alternative to try is to place the contents of the matlab extension folder in a new folder inside your Documents folder, something like matlab-models. Then if you place an nlogo model file there and load it, NetLogo should use this matlab-models folder's copy of the extension, and you'll definitely have proper permission to write to it in your Documents folder. You want the matlab.jar file right alongside the nlogo models you use Matlab with if you try this.

Related

NetLogo create-movie: where to find and how to add VID extension?

I would like to create a movie from my NetLogo model. I followed the Movies example here: http://ccl.northwestern.edu/netlogo/docs/programming.html#movies
I have added the parts of code into my model, and created the button "make-movie" in my interface.
extensions [vid]
; ....
to make-movie
setup
vid:start-recorder
vid:record-interface ;; show the initial state
repeat 2
[ go
vid:record-view ]
vid:save-recording "out.mp4"
end
When I try to run it, I have an error: Can't find extension: vid and NetLogo directs me on the github website: https://github.com/NetLogo/NetLogo/wiki/Extensions to download one. However, there is no VID extension. I think the closest is the Gst-Video so I downloaded it, unzipped the files and copied the files to this location: C:\Program Files (x86)\NetLogo 5.2.1\app\extensions, as I run on 64-bit Windows with 32-bit NetLogo.
NetLogo still can't find this extension.
Please, where can I find the VID extension? And how can I correctly add this extension in the extension library? Is is sufficient just copy, unzip and paste the downloaded file?
Looks like you're using Netlogo 5.2.1- Vid was added in 6.0. You should upgrade to the latest version if you want to use Vid. If you don't want to upgrade, you should still be able to use the movie primitives in version 5.2.

Matlab: search path locked for editing?

I have written some database management software in Matlab. Occasionally data is labeled incorrectly and must be moved manually using windows explorer. All of the folders of the database are in the matlab search path via addpath(DataBaseRootDir). When one attempts to move or delete a folder in the search path, windows gets stuck waiting for Matlab to stop accessing the folder.
Is there a way to prevent this programmatically? It is always possible to close Matlab, make chances, and re-open the software but this is sub-ideal.
Thanks!
http://de.mathworks.com/help/matlab/ref/rmpath.html
rmpath(DataBaseRootDir)
Be aware that like addpath this will only remove the directory, but leave any subdirectories in the path, so if the directory has subdirectories that are also in the path, you would need to remove them as well.

Manually Adding Toolbox to Matlab R2013b

I am working with OS X version 10.9.4 and using Matlab R2013b. I have recently downloaded a toolbox file and it saved as a folder on my desktop. It contains a bunch of .m files, which I'm not really sure how to add into my Matlab. I've read online and watched a few tutorials that all mention that I need to set the path to Matlab, but I can't seem to get it to work for me. I'm very new to Matlab and have been trying to figure this out for a couple of days, so my apologies if this is a very simple question to be asking.
There are a couple of ways of doing this. When a function is called in Matlab, it will look in all the directories contained within the path to find it. You can bring up the path by typing in the command "path".
Presumably, you want to add a new location for Matlab to look. This can be done via the addpath command. Addpath accepts both relative and absolute addresses. For example the command
addpath('C:\My_Matlab_Functions')
will enable you to access functions & files within the folder My_Matlab_Functions.
Relative directories are taken relative to the file which calls addpath. For example if I am running a function within C:\users\user_name\My_Documents\Matlab, calling
addpath('Tools')
will enable you to access all of the files within C:\users\user_name\My_Documents\Matlab\Tools. You can also go up directories via '..'. For example, if I am running a function within C:\users\user_name\My_Documents\Matlab\Project1, the command
addpath('..\Tools')
Accesses the same tools folder as before.
I have tried these examples on Windows, but I presume they work the same on a Mac. Hope this helps.
Alternatively, you may be able to add your file(s) directly into Matlab's built in toolbox. I don't know whether Matlab automatically searches for new folders here, but it may be worth a shot.

Accessing any folder from a compiled MATLAB application

I am developing a windows stand alone application in MATLAB 2012b .
In the code I am writing some files in two folders images and dump which are both accessible to the user. I want those two folders to be in the same folder as the final executable. I can create those folders manually. However, when I run the compiled application, it does not seem to access those folders. For example, the following line of code works perfectly when run from inside MATLAB,
save(fullfile('./images/camp.mat'),'camp','-v7.3');
however it does not seem to work in GUI as it seems to stop working at that point only and nothing is created in the images folder.
I have searched through the internet and found things like ctfroot() and MCR_ROOT etc but I am not able to solve my problem.

How to modify Xcode 4 Project to be Machine independent like Visual Studio or Eclipse behave

I'm very surprised not to be able to open my Xcode project on another mac, I have never that kind of problem with Visual Studio or Eclipse. I have tried this Info.plist file "no such file" error but it's not enough.
I have other errors like MyAppViewController files not found in some folder whereas I checked that the files are actually there.
So how do I modify XCode 4 project so that it can be opened on any mac ?
Update: contrary to what is claimed here Duplicating / importing Xcode projects from one Mac to another copying isn't enough
Update 2: should I be obliged to buy that kind of tools to do so ? http://itunes.apple.com/fr/app/project-duplicator-for-xcode/id467950482?mt=12
Copying the files over is enough, as long as you copy all files over and no files are referenced from your project file using absolute paths.
Note that you don't have to choose to have absolute paths. I'm unsure of the exact details, but I've ended up with absolute paths in projects without doing so explicitly.
For example, here's a project with a missing file:
When I select the missing file, I can see that it's using an absolute path:
At this point, you have two options:
You can click the button in the bottom right of that red box I've drawn to find the file. Make sure you pick the right file; if you pick one with a different name, Xcode will happily replace DetailViewController.m with SomeUnrelatedFile.m and you'll have lost the hint about the original file. After finding it, make sure to pick Location: Relative To Group (usually, that'll be the right choice anyway) to avoid this happening again.
Possibly safer, go back to the original computer. For any file that you know is missing on the destination computer, pick Location: Relative To Group. Then copy everything over again.
I'm not sure if this is what you're after but it might help; I use git on to keep my two laptops in sync with a single project. I don't have any file missing errors and it comes with all those other repository benefits.
You shouldn't need any tools to do this, Xcode projects can be moved, shared between other members of your team and opened on any supported machine.
There must be another problem you have, so you need to post the error.
And when you get it resolved.... using a free remote source control service such as bitbucket, would be good for you to know and get into the practice of using.