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
suppose I want to get help from a function. I can simply type h=help('myfunction). But then suppose that I have ano...
Asked 1 month 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 define, for my own use, new methods for some matlab classes such as cell, struct, among others.
Asked 2 months ago
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 am facing this apparently simple problem: I am trying to write a parfor loop that containts a function call with ...
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 3 months 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 11 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...
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...
I have the following problem. I have two classes, say second_class and first_class, where second_class<first_class i.e. s...
The following computations are very expensive for large matrices A, B and the coefficient q.
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...
Asked 12 months ago
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 would like to use regular expressions to capture and transform expressions of the form
Asked 17 days ago
Join the conversation