Answered
Indexing way to retrieve indices of nonempty elements of a cell array?
a={[], {3}, [], [], eye(100)}; b=find(~cellfun('isempty',a))

15 years ago | 0

| accepted

Answered
xlsread only works once per matlab session
Maybe it is due to memory problem. Can you try clear all and then run xlsread() again?

15 years ago | 0

Answered
Converting Dates in the Cell Array into Serial Numbers
It seems to work for me. "all identical serial numbers" may be just a visual thing. They are actually different. You can use dat...

15 years ago | 1

| accepted

Answered
Sorting some data
Your data doesn't seem to be consistent. Did you have some typo? I would assume your data should be a repetition of the followin...

15 years ago | 0

Answered
How I can use rand('seed', ??) for neural network model?
Every time you use rand(), it gives you a random number, that is what rand() is for. But what if you want to repeat that random ...

15 years ago | 1

Answered
Why are there duplicate posts in MATLAB Answers?
For similar questions, I can't emphasize enough the need to improve the search capability of this site. I saw questions that I k...

15 years ago | 0

Answered
Why are there duplicate posts in MATLAB Answers?
There are a few times that the web browser didn't refresh soon enough when I add an answer or comment. It makes me doubt whether...

15 years ago | 0

Answered
Importing an Excel File - How to ignore non-numeric values
I would recommend trying [NUMERIC,TXT,RAW]=XLSREAD(FILE) to see if it can put numeric data apart from string data. If not, you c...

15 years ago | 2

Answered
Trouble with MATLAB vectorized piecewise function
There is a built-in function to do that. It is called interp1(). In your case: A=[1:5; 1:5]' t=-2:2:6 f=interp1(A(:,1...

15 years ago | 0

Answered
How do I get started with Image Processing?
To get MATLAB basics, type "doc" in MATLAB command window, go to MATLAB>Getting Started. For image processing, follow <http:/...

15 years ago | 0

Answered
What is the keyboard shortcut to switch between open files in the editor?
"Ctrl-Page Up" and "Ctrl-Page Down"

15 years ago | 2

| accepted

Answered
importing tab delimited text file
try a=importdata('A.txt') to see what you got. Many times, it will give your well-formatted data.

15 years ago | 2

Answered
Adding Labels to a bar graph
I ran your code without any problem. The error message indicates that you might have a variable called xlabel. Check your worksa...

15 years ago | 1

| accepted

Answered
Matlab Movie
axis([Xmin Xmax Ymin Ymax]);

15 years ago | 0

| accepted

Answered
Equivalent R2010b Toolboxes in R2011a
<http://www.mathworks.com/help/base/relnotes/brsz3y4-1.html This link> might help.

15 years ago | 1

| accepted

Answered
Matching two time series by one of their time vector
Would <http://www.mathworks.com/matlabcentral/answers/12139-detecting-gaps-in-time-series-data-and-replacing-with-nan this post>...

15 years ago | 0

Answered
embeded matlab function
You type the following line in Command window and then follow instructions: mex -setup

15 years ago | 0

Answered
write data from gui in excel
The format for range is 'a2:c4' as an example. For a single cell, you need to specify it as 'd4:d4' for example. The range f...

15 years ago | 0

| accepted

Question


Sorting problem of "My Answers" on MATLAB Answers website
Any progress on the issue? It is a month now! Not only the order is reversed, the order didn't get updated, i.e. the latest upda...

15 years ago | 2 answers | 0

2

answers

Answered
Scale plot problem !!
axis([Xmin Xmax Ymin Ymax]);

15 years ago | 1

| accepted

Answered
Publishing pdf, pb with line lenght
One way to consider is to use the ... symbol to put your code in multiple lines. M-editor has a right-hand text limit, which is ...

15 years ago | 1

| accepted

Answered
Using Paramater set in Simulink model
It should work, e.g. paramset.g1=1:3; paramset.g1(2)=20

15 years ago | 0

Answered
Changing the names of text files in a directory
Copy all your files to a folder named '\test' under current folder, run the following code. %% Folder=fullfile(pwd,'tes...

15 years ago | 0

| accepted

Answered
write data from gui in excel
Yes, xlswrite() works anywhere. You need to pay attention in the code where you have the xlswrite() line that you have access to...

15 years ago | 0

Answered
Square Pulse Generator with Varying Amplitude
If the pulse is non periodic, how do you use Pulse Generator block? One solution is to use the Signal Builder block, you can ad...

15 years ago | 0

| accepted

Answered
How to get surf to plot all points and not ignore last row and column?
[x,y]=meshgrid(1:4,1:4); z=repmat(1:4,4,1); figure(1);scatter3(x(:),y(:),z(:)); figure(2);surf(x,y,z); I see nothi...

15 years ago | 0

Answered
Writing time data into excel
This is probably one of the dumbest thing that Excel does. Sometimes I hate it too. What I did is like this: %% time={'1...

15 years ago | 0

| accepted

Answered
Multiply then sum elements of two matrices (Sum of two Matrix Products)
A=rand(116,750); B=rand(116,750); C=A.*B; Result=sum(C(:));

15 years ago | 1

Answered
Controllability Gramian
use the state space ss() function. help ss SS Constructs state-space model or converts model to state space. Cons...

15 years ago | 1

| accepted

Load more