On assignment, they gave me a step-by-step example from this article http://wiki.octave.org/Bim_package.
The example was typed manually, without copy-paste.I already install this packages- fpl, bim,msh, image.
Octave example:
pkg load bim
pkg load msh
pkg load fpl
[mesh]=msh2m_gmsh("fuime","scale",1,"clscale",.1); – Error
[mesh]=bim2c_mesh_properties(mesh);
pdemesh(mesh.p,mesh.e,mesh.t);
view(2)
xu=mesh.p(1,:).';
yu=mesh.p(2,:).';
nelems=columns(mesh.t);
nnodes=columns(mesh.p);
epsilon=.1;
phi=xu+yu;
AdvDiff=bim2a_advaction_diffusion(mesh,epsilon,1,1,phi);
Mass=bim2a_reaction(mesh,1,1);
b=bim2a_rhs(mesh,f,g);
A=AdvDiff+Mass;
GammaD=bim2c_unknowns_on_side(mesh,[1 2]);
GammaN=bim2c_unknowns_on_side(mesh,[3 4]);
GammaN=setdiff(GammaN,GammaD);
jn=zeros(length(GammaN),1);
ud=3*xu;
Omega=setdiff(1:nnodes,union(GammaD,GammaN));
Add=A(GammaD,GammaD);
Adn=A(GammaD,GammaN);
Adi=A(GammaD,Omega);
And=A(GammaN,GammaD);
Ann=A(GammaN,GammaN);
Ani=A(GammaN,Omega);
Aid=A(Omega,GammaD);
Ain=A(Omega,GammaN);
Aii=A(Omega,Omega);
bd=b(GammaD);
bn=b(GammaN);
bi=b(Omega);
temp=[Ann Ani;Ain Aii]\[jn+bn-And*ud(GammaD); bi-Aid*ud(GammaD)];
u=ud;
u(GammaN)=temp(1:numel(GammaN));
u(Omega)=temp(length(GammaN)+1:end);
jd=[Add Adi Adn]*u([GammaD;Omega;GammaN])-bd;
[gx,gy]=bim2c_pde_gradient(mesh,u);
[jxglob,jyglob]=bim2c_global_flux(mesh,u,epsilon*ones(nelems,1),ones(nnodes,1),ones(nnodes,1),phi);
fpl_vtk_write_field("vtkdata",mesh,{u,"Solution"},{[gx:gy]',"Gradient"},1);
pdesurf(mesh.p,mesh.t,u);
In this - [mesh]=msh2m_gmsh("fuime","scale",1,"clscale",.1);Error
Generating mesh...
error: 'tmpnam' undefined near line 78, column 78
error: called from
msh2m_gmsh at line 78 column 12
>>
WHAT HAVE I TAKEN TO FIX THE ERROR
I decided that the problem is in uninstalled packages.
According to the answer I was given in this thread Error,when installing a new package in Octave.
I started to install the package mesh, but here another error came out.
error: get_forge_pkg: package not found: "mesh". Maybe you meant "lssa?"
error: called from
get_forge_pkg at line 90 column 5
get_forge_download at line 32 column 14
pkg at line 500 column 31
But the mesh package not found.The package msh already installed.
How I can fixed my problem?
I use Octave 5.2.0 in GUI.
After using Octave for 2 weeks I'm suddenly confronted with errors I didn't
have before with the same code.
Also today I suddenly received a message not finding the 'close' in this
code :
clear ; close all; clc;
error: 'strcat' undefined near line 44 column 25
error: called from
handleSto at line 44 column 24
testinvoer03 at line 69 column 1
>> EXEC_PATH
ans =
C:\Octave\OCTAVE~1.0\mingw64\bin;C:\Octave\OCTAVE~1.0\mingw64\notepad++;C:\Octave\OCTAVE~1.0\mingw64\libexec\octave\5.2.0\site\exec\x86_64-w64-mingw32;C:\Octave\OCTAVE~1.0\mingw64\libexec\octave\api-v53\site\exec\x86_64-w64-mingw32;C:\Octave\OCTAVE~1.0\mingw64\libexec\octave\site\exec\x86_64-w64-mingw32;C:\Octave\OCTAVE~1.0\mingw64\libexec\octave\5.2.0\exec\x86_64-w64-mingw32;C:\Octave\OCTAVE~1.0\mingw64\bin
>> strcat("ddd" ,"fff")
error: 'strcat' undefined near line 1 column 1
I found the strcat file strcat.m in
C:\Octave\Octave-5.2.0\mingw64\share\octave\5.2.0\m\strings.
Obviously the not in the exec_path.
I also checked path which gave me a point only.
I have added addpath("C:\\Octave\\Octave-5.2.0\\mingw64\\share\\octave\\5.2.0\\m")
now the Octave command windows tells me:
error: 'close' undefined near line 63 column 1
error: called from
testinvoer03 at line 63 column 1
The code was:
% &nd=1986-01-02 ??
% &revision_date=2020-02-21&nd= ??
…
%
clear;
close all;
clc;
land={'world'}; %{'world','us','jp'};
%
…
line number 63 was correct.
Anybody had this problem. Some advise please.
error: 'cholupdate' undefined near line 209 column 14
error: called from
fminunc at line 209 column 12
ex2 at line 86 column 13
My C drive had run out of space so the installation probably didn't succeed properly.
Reinstalling Octave after clearing space has fixed the issue.
Thanks for your help.
I want anything to work with xlswrite in octave. Eventually I want to be able to put a cell array containing but really anything working at all would be a start.
I've put in the following lines as this is the simplest case I could think of:
array1 = [0 9 10]
cellarray1 = num2cell(array1)
xlswrite ('/home/willubuntu/acpimrepo/bob.xlsx', cellarray1)
Then I get this error:
error: `xlswrite' undefined near line 9 column 1
I've tried this:
xlswrite ('/home/willubuntu/acpimrepo/bob.xlsx','cellarray1')
And get the same error:
error: `xlswrite' undefined near line 9 column 1
I've tried removing the space between xlswrite and the opening parenthesis - same error.
I've tried using array1 and not cellarray1 and got the same error (with both parenthesis options).
I've tried removing the directory from the file name and get a very slightly different error:
error: `xlswrite' undefined near line 10 column 1
What is going on? Why doesn't xlswrite work? What piece of pedantry am I missing?
Please remember that if you say anything too sophisticated, it will go over my head. Remember I am clueless and at the end of my tether.
If you would use a recent Octave version you would see
octave:1> xlswrite
warning: Functions for spreadsheet style I/O
(.xls .xlsx .sxc .ods .dbf .wk1 etc.)
are provided in the io package. See <http://octave.sf.net/io/>.
which guides you to the right direction.
Even a quick search on http://wiki.octave.org/Main_Page would solve this. Perhaps you should spend some minutes with a search machine or the manual and the wiki instead of moaning how annoying and boring GNU Octave is.
I would like to use Matlab regionprops function in Octave.
I am getting error: `regionprops' undefined:
octave-3.2.4.exe:744> s = regionprops(Image, 'centroid');
error: `regionprops' undefined near line 744 column 6
Is there a way to use it? How do I proceed?
Install the Image package available at http://octave.sourceforge.net/image/index.html