Tagged Questions
4
votes
3answers
32 views
How to select a specific .m function when two exist?
First, here the way i'm calling the function :
eval([functionName '(''stringArg'')']); % functionName = 'someStringForTheFunctionName'
Now, I have two functionName functions in my path, one that ...
0
votes
1answer
16 views
efficient storing of matlab shape functions
I'm trying to find an as efficient as possible way to store and call my matlab shape-functions. I have an interval x=linspace(0,20) and a position-vector
count = 10;
for i=1:count
...
0
votes
1answer
10 views
S-function documentation that “S-function level-1 supports vector inputs and outputs. DOES NOT support multiple input and output ports”
I read in S-function documentation that "S-function level-1 supports vector inputs and outputs. DOES NOT support multiple input and output ports".
Does the second sentence mean the input and output ...
0
votes
0answers
22 views
Function handler
I'm using two distinct functions on matlab: function1 and function2 (each written in a different script).
In the script of function1, I have something like:
function result = function1(y,z)
result ...
0
votes
1answer
25 views
Cycling through a folder and using a matlab operation on each file [on hold]
I am BRAND NEW to Matlab (like, 5-minutes ago new). I need it to read some files that I have because no other program can read them. I was hoping someone could help me understand some basic matlab ...
0
votes
1answer
32 views
Is it possible to differentiate between a class method and a function with a class parameter in Matlab?
Say I have a class Foo with a method bar.
I also have an independent function bar which takes objects of class Foo.
Is it possible to differentiate the two? Or are they the same?
foo = Foo()
...
0
votes
0answers
19 views
import function in octave
I am running matlab code in octave. The import function is not implemented in core octave, I guess. Any idea how to use this matlabe fuction in octave?
Here is what I have:
octave-3.4.0:7> setup
...
0
votes
1answer
36 views
Rewriting a function in specific terms with Matlab
I feel there should be an easy solution to my problem but I couldn't find it.
I can explain my problem through a very simple example:
Given the functions f and a:
f := x(x-3) + 2x(x-3)
a := (x-3)
...
4
votes
3answers
68 views
How to force matlab to call a regular function rather than class method when they are overloaded?
Assume I have an object X of class MyClass. MyClass has a method compute, and when I call U = compute(X,...), matlab automatically calls the class method. However, what I actually want is to call ...
0
votes
1answer
20 views
Matlab Function Block with error generated by Stateflow
I have been trying to use "Matlab Function" block for hours using very simple example from this link ...
0
votes
1answer
29 views
Does Matlab support multiple access of a function at the same time?
I have a situation in Matlab where a function "A" might be accessed at the same time (simultaneously) by 2 other functions. From what I know, for this to work, Matlab should make 2 seperate copies and ...
0
votes
1answer
29 views
Matlab - Unknown Warning and implay default size window
Hi guys i got a question on a project i have on matlab and since i am new i need your assist :
I have a function that works great, but i am getting a warning :
"Warning: Size vector should be a row ...
0
votes
3answers
70 views
How to call multiple functions from a single .m matlab file [duplicate]
I have an algorithm written in one m file and i have several functions that i created in another .m file. I want to call these several functions i created in a separated file from the main algorithm ...
0
votes
1answer
24 views
How I can sort solve function (MATLAB) output?
I created the symbolic matrix "T" by this code:
for row = 1:n
for col = 1:m
T(row, col) = sym(sprintf('T_%d_%d', row, col));
end
end
for n=4 , m=4 the result is:
[ T_1_1, T_1_2, T_1_3, T_1_4]
...
1
vote
1answer
38 views
How to use conditions within an anonymous function
A function can be defined as @(x) x^.2 (for e.g)
But in case, we have a function that takes different representation on different intervals for e.g : if abs(x)<3 fun = x^.2 else 0
How can we ...