Top 5% contributor
I plan to formally test the three versions. But a more simple question is the following: suppose we just have 2 dimensions. Why ...
Answered 2 years ago
I have a solution to my own question but I don't know whether it is the best strategy: Create an anonymous function that is more...
Answered 3 years ago
Dear all, thank you SO much for a prompt reply. I now have many suggestions but don't know which one is the best. I will test th...
I would like to detect whether a string contains an alphabetical letter. A simple way of solving this problem is writ...
Asked 3 years ago
Thank you both. That is one big problem solved. The biggest remains though: how do I become as good as you guys are with regular...
Thank you guys, I was aware about the mat2cell trick but I also agree that it seems pointless to put data in a structure and was...
4 years ago
Hi all, I have the following problem: I have a structure, say 'M', with fields 'names' and 'parameters'. There are k fields and ...
4 years ago
I have a string x and in order to determine wether it is a number one can do the following
flag = isnumeric(ev...
Asked 1 year ago
I don't know anything about regular expressions and I have two questions:
# What is the most effective way to learn ...
I would like to write the following statements into a function
Dear all, I am slowly making progress on my learning of regular expressions. At the moment, I am trying to solve the following p...
I have the following problem: I would like to avoid writing a function as an m-file. Instead (and ideally) I would li...
I thought I could exploit the fact that a matrix is sparse to build a big matrix. I would like to build a sparse matrix o...
Asked 12 days ago
I have two matrices A and B of respective sizes [na,m] and [nb,m], with na>=nb. Both matrices have the same number ...
Asked 9 months ago
I have a class C1 with a dependent property d and another class C2 which inherits from C1.
When property d is called fro...
Asked 12 months ago
In a symmetric matrix A of size [n,n], for two indices i and j such that 1<=i<=n and 1<=j<=n we have that A(i,j)=A(j,...
I have to deal with arrays of dimension 4 or 5. So far, I can only think of 3 ways to represent such arrays.
Asked 2 years ago
I have the following problem. I wrote some code where I overload various operators (+ - * /) and I would like to ke...
I have a function "myfunc" to minimize subject to a set of nonlinear constraints written in a function "myconstr". Th...
I would like to write two functions:
1- replace all occurrences of 'a(number)' and 'bb(number)' with respectively 'a_nu...
The following computations are very expensive for large matrices A, B and the coefficient q.
Asked 9 days ago
Is there any way to have control over the variables entering the workspace of an anonymous function? I have been ex...
I have two vectors A and B of respective sizes na and nb, with na>=nb. All elements in B are unique while the eleme...
I have noticed using functions, nested functions and sub-functions considerably decrease the speed of execution. I...
Hi all and happy new year!
I have the following simple problem. I have a function say
I posed a problem earlier and it was not answered. I guess I did not pose the problem well. I try again as my unde...
Asked 5 months ago
I have two problems related to anonymous functions:
1-) I create an anonymous function taking several inputs ins...
I would like to extract parts of a string. In particular, I would like to extract all elements between two limits LI...
Asked 8 months ago
Suppose I have the following function
I am facing a problem I have not seen before. I have overloaded the plot function for a certain class. Up until 201...
Join the conversation