Answered
Driver Editor: ability to assign array of doubles directly to a property
What do you mean? Can mat2str() be used? >> mat2str(magic(2)) ans = [1 3;4 2]

14 years ago | 0

Answered
Replicating a plot over multiple periods in the same figure
If a and b are varied, then you need to put a and b as input arguments for f too. Even with that, I think it's still hard to ma...

14 years ago | 0

| accepted

Answered
Copying rows from a matrix that meet a condition into new matrices
Use logical index. %% d=[32 734786.452997685 5.70000000000000 361 32 734786.452997685 5.70000000000000 367 1 73478...

14 years ago | 0

Answered
Location of value in cell array
When you delete some of the elements using cell{1}(i)=[], the length of cell{1} reduces thus cause "Index exceeds matrix dimensi...

14 years ago | 0

| accepted

Answered
cell to matrix
If all cells have the same number of columns, would this help? %% a{1}=rand(3,2); a{2}=rand(4,2); a{3}=rand(5,2); ...

14 years ago | 1

Answered
Shuffle matrix elements
I believe it means to be randperm(), not perms(). %% OrigData=magic(3); X=randperm(numel(OrigData)); ShuffledD...

14 years ago | 3

Answered
Index exceeds matrix dimensions. (loading datas)
You have 9 columns of data so I assume the resulting C is a 1x9 cell array. You don't have C{10}. That is what the error message...

14 years ago | 0

Answered
Line plotting
If "length(overlap_peaks2) is just equal to 1", then in your code, yy will be 1 and the loop runs once. What is the length of ov...

14 years ago | 0

Answered
Using wildcards in library ForwardingTable
I guess not. That's just the way 'ForwardingTable' is designed to do. If you don't want to duplicate the data entry, you can ...

14 years ago | 0

Answered
Problems with accessing external application via COM Object
I think it should be invoke(), instead of run().

14 years ago | 0

Answered
Indicator Function Error
Your v is an anonymous function. It has three input arguments. In your f (also an anonymous function), there are v(t<0), v(0<...

14 years ago | 0

| accepted

Answered
Convert the hexadecimal representation of a binary double-precision number back into a double
>> x=rand x = 0.126986816293506 >> s = sprintf('%bx',x) s = 3fc0411a9f807b7c >> y=hex2num(s) y = ...

14 years ago | 1

| accepted

Answered
nested for loop
Letter={'X','Y','Z','K','V'}; for i=1:6 for k=1:length(Letter) str=sprintf('%s%d',Letter{k},i); end end ...

14 years ago | 0

| accepted

Answered
add a function to a model
Use the "MATLAB Fcn" or "Fcn" block from library Simulink>User-Defined Functions.

14 years ago | 0

| accepted

Answered
Get lineseries handle
If you want to change the legend, get the handle of the legend, or simply run legend() again. %% plot(magic(3)); lege...

14 years ago | 0

Answered
how deal with date?
You can convert the date string to numeric and then compare. a=datenum('2005-09-06'); b=datenum('2005-09-05'); a>b

14 years ago | 0

Answered
conditionally executed subsystem introduces direct feedthrough
Did you use a Merge block? That's typically needed when you have a conditionally executed subsystem.

14 years ago | 0

Answered
Real-Time in R2011b?
To make the simulation "really" in real-time, you need to run the simulation in a target (micro-controller) with a real-time ope...

14 years ago | 1

| accepted

Answered
solving a linear program
What is the problem? Can you show an example? I would think it can be solved. For 3 variables, maybe even without the Optimizati...

14 years ago | 0

Answered
Interpolating missing values
Interpolation on a 1-D vector is not that hard. Maybe it could be expanded to 2-D matrix too. See if interp1() is all you need. ...

14 years ago | 0

Answered
How to change the standard of coloring figures
Function plot() allows you to specify the line color, marker and line style. You'll just need to specify the color as black ('k'...

14 years ago | 0

Answered
break command
You can figure it out by going through the for-loop in your brain. The first time that a(i)>20 is satisfied is when a(i)==21, ri...

14 years ago | 0

Answered
change variable name
In one place, X7 is a variable. In the second place, 'X7' is a string. I am not sure what you try to do, but I don't see a real ...

14 years ago | 0

| accepted

Answered
Using print command recursively.
use sprintf() to print to a variable of string. pre_f=sprintf('f(%d) is %fI(x>f)',t,a(t),b(t)); use %s to print a string. ...

14 years ago | 1

Answered
initialize gui
Do you mean you want your GUI looks like the last time you end your GUI application? That can be done but you have to save your ...

14 years ago | 0

Answered
Replace values in large matrix using If else
You could use if-else, but using index is easier and more efficient. It applies to dataset array or ordinary array. Use this exa...

14 years ago | 0

Answered
Rename Signals in Simulink with MATLAB
It can be done. You just need to get the handle of the signal line. There are many ways to get the handle of the signal line....

14 years ago | 3

Answered
Help on MinMax Running Resettable
What is your difficulty? If you click the help button at the dialog, is the help document enough for you to understand how to us...

14 years ago | 0

Answered
Number of digits in static text in GUI
Your variable 'result' must be a string. If you use num2str(), the default precision is 4 digits, such as num2str(pi) shows 3.14...

14 years ago | 1

Load more