Domanda


Mapping locations of similar rows in two matrices
Dear all, I have two matrices A and B of respective sizes [na,m] and [nb,m], with na>=nb. Both matrices have the same number ...

oltre 9 anni fa | 2 risposte | 0

2

risposte

Domanda


Can this be vectorized?
Dear all, 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...

oltre 9 anni fa | 1 risposta | 0

1

risposta

Domanda


On dependent properties: Is this poor Object Oriented Programming?
Hi, I have a class C1 with a dependent property d and another class C2 which inherits from C1. When property d is called fro...

quasi 10 anni fa | 2 risposte | 0

2

risposte

Domanda


how to connect different classes?
Dear all, Suppose I have the following function function varargout=myfunc(f,varargin) atmp=cell(500,4); iter=0;...

quasi 10 anni fa | 1 risposta | 0

1

risposta

Domanda


Exploiting symmetry in multidimensional arrays
Dear all, 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,...

circa 10 anni fa | 2 risposte | 0

2

risposte

Domanda


What is the fastest way to determine whether a string is a number?
Hi, I have a string x and in order to determine wether it is a number one can do the following try flag = isnumeric(ev...

circa 10 anni fa | 2 risposte | 2

2

risposte

Domanda


saving and loading objects
Dear all, This, I guess, would be a simple question to most of you but it is not obvious to me. I have been developing a class ...

quasi 11 anni fa | 0 risposte | 0

0

risposte

Risposto
structures, cells or high dimensional arrays
I plan to formally test the three versions. But a more simple question is the following: suppose we just have 2 dimensions. Why ...

circa 11 anni fa | 0

Domanda


speed, functions and overheads
Dear all, I have noticed using functions, nested functions and sub-functions considerably decrease the speed of execution. I...

circa 11 anni fa | 1 risposta | 0

1

risposta

Domanda


structures, cells or high dimensional arrays
Dear all, I have to deal with arrays of dimension 4 or 5. So far, I can only think of 3 ways to represent such arrays. # ...

circa 11 anni fa | 2 risposte | 0

2

risposte

Domanda


How to avoid using a global variable in this case
Dear all, I have the following problem. I wrote some code where I overload various operators (+ - * /) and I would like to ke...

oltre 11 anni fa | 2 risposte | 0

2

risposte

Domanda


nonlinear constraints in fmincon
Hi all, I have a function "myfunc" to minimize subject to a set of nonlinear constraints written in a function "myconstr". Th...

oltre 11 anni fa | 2 risposte | 0

2

risposte

Domanda


assignment of an object to a vector
Hi all and happy new year! I have the following simple problem. I have a function say res=myfunc(a,b,c) res=zeros(2...

oltre 11 anni fa | 1 risposta | 0

1

risposta

Domanda


How to use matlab container.map?
Hi all, I have the following problem. I have a potentially large number of objects. The objects are the nodes of a tree. Each br...

quasi 12 anni fa | 0 risposte | 0

0

risposte

Risposto
Is it possible to write several statements into an anonymous function?
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...

quasi 12 anni fa | 0

Domanda


Is it possible to write several statements into an anonymous function?
Hi all, I would like to write the following statements into a function z=zeros(5); z(1,1)=x(1)*cos(x(2)); z(3,4)=log(...

quasi 12 anni fa | 11 risposte | 3

11

risposte

Domanda


removing parentheses around digits using regular expressions
Dear all, I am slowly making progress on my learning of regular expressions. At the moment, I am trying to solve the following p...

quasi 12 anni fa | 3 risposte | 0

3

risposte

Domanda


replacing a string with another and vice versa
Hi, I would like to write two functions: 1- replace all occurrences of 'a(number)' and 'bb(number)' with respectively 'a_nu...

quasi 12 anni fa | 2 risposte | 0

2

risposte

Risposto
detecting the existence of alphabetical elements
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...

quasi 12 anni fa | 0

Domanda


detecting the existence of alphabetical elements
Dear all, I would like to detect whether a string contains an alphabetical letter. A simple way of solving this problem is writ...

quasi 12 anni fa | 5 risposte | 0

5

risposte

Risposto
regular expressions resources and regular expression problem
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...

quasi 12 anni fa | 0

Domanda


regular expressions resources and regular expression problem
Hi all, I don't know anything about regular expressions and I have two questions: # What is the most effective way to learn ...

quasi 12 anni fa | 4 risposte | 0

4

risposte

Domanda


How to avoid writing a script function ?
Dear all, I have the following problem: I would like to avoid writing a function as an m-file. Instead (and ideally) I would li...

oltre 12 anni fa | 3 risposte | 0

3

risposte