Answered
Trying to plot Gaussian with a for loop - no luck!
You are over-writing A every time in the for-loop so the plot just shows one data point. Declare A as an array, and then use A...

15 years ago | 0

| accepted

Answered
drawing tangent line on palm
use line() or annotation()

15 years ago | 0

Answered
not displaying "figure 1" while window of plotting coming up
h=figure(1); set(h,'numbertitle','off')

15 years ago | 1

| accepted

Answered
Dynamic Mask Parameters
It can be done but I can't understand your use case. The "water requirement" is calculated by some Simulink blocks and it is pas...

15 years ago | 1

Answered
Periodically Updated Static Text and Reading from Key-Value File
For 1, you can probably use a timer object and set up the callback to refresh your text label. For 2, you can use the parameter...

15 years ago | 1

| accepted

Answered
Good programming practice...
Where do you want to start? I'll add as I come up with some. * pre-allocate large size variables using zeros(), cell()

15 years ago | 3

Answered
Need help for these two commands
It creates a 1 by dif matrix and all its value is zero. cat(2, ADSR, zeros(1,dif)) is the same as [ADSR, zeros(1,dif)] I want...

15 years ago | 0

Answered
how could numbers be displayed only in 4 digits (also in answer of sprintf)
sprintf('%4.3f',pi) doc sprintf

15 years ago | 1

| accepted

Answered
matrix manipulation
Vec=[A(:) B(:) C(:)]'

15 years ago | 0

| accepted

Answered
Reading datasets by FOR loop!
I think this question has been asked many times. Don't name your variable as dataset_1, dataset_2, ... Now you saw the difficult...

15 years ago | 0

Answered
Sorting problem of "My Answers" on MATLAB Answers website
As of Wednesday evening, 9/21/2011, the problem has just been solved by the system update.

15 years ago | 1

| accepted

Answered
Help required in populating a structure correctly
Answer to question (a) is Yes. The reason you only get the variable from the last .mat file is because you are over-write the v...

15 years ago | 0

| accepted

Answered
Calling for a matrix value
t can not contain 0. Maybe t should be 1:24? You can use this syntax to get the first column of Qsol Qsol(:,1)

15 years ago | 1

| accepted

Answered
annotation in guide gui application
use the annotation() command in the creatfcn callback of your GUI.

15 years ago | 0

Answered
finding number of a column in a cell (column that contains a specified string)
%% CELL={'a','b','c';'d','e','f'}; [Row,Col]=ind2sub(size(CELL),find(ismember(CELL,'e'))) or [Row,Col]=ind2sub(size(CE...

15 years ago | 2

| accepted

Answered
How to using global variables in reference models
See "global tunable parameters" and "Global nontunable parameters" in the document or at this link. <http://www.mathworks.com/he...

15 years ago | 0

| accepted

Answered
Error using Merge Block
I don 't have that Toolbox so can't comment the specific. But simply said, you can not connect the output of that block to the M...

15 years ago | 0

Answered
Simulink For block in Real time
When you run simulation of a Simulink model, it is not in real time. The simulation could be faster or slower than the real time...

15 years ago | 0

Answered
getting the values at certain locations
data=m(v)

15 years ago | 0

Answered
Use a textscan to read information from a mass spectra file
Copy your text data to a file called test.txt and use the following code. %% txtfile='test.txt'; fid = fopen(txtfile)...

15 years ago | 0

| accepted

Answered
Simulating transfer functions in MATLAB?
Not sure what is "given one signal that over samples another". Use tf() to define a transfer function, use step() to see the ste...

15 years ago | 0

Answered
replace one word with another one in a string
strrep(s,'background','hello');

15 years ago | 0

Answered
matrix and vector indices out of range
The problem is about the variable i. Many people use i as a variable to do iteration in a for-loop, for example i=1:5. Wit...

15 years ago | 0

Answered
round-off issue?
Rounding error caused by floating point calculation. >> 3.501/40*20*10 ans = 17.504999999999995

15 years ago | 0

| accepted

Answered
is there instead solution of xlsread()?
Try the COM server running Microsoft Excel. <http://www.mathworks.com/help/techdoc/ref/actxserver.html>

15 years ago | 1

| accepted

Answered
Plotting certain columns from a .dat file
If your data file format is consistent, try data=importdata('MyFile.data'); For plotting, if you have a matrix A, A(:,2) is...

15 years ago | 1

| accepted

Answered
Convert char to multiple cells, each cell takes one string
%% a='Runtime_CurRuntime_PrevId_CurId_PrevDescriptionPNLPNL_Curvaluedate_CurPNL_Prev'; size(a) b=mat2cell(a,1,[10 10 ...

15 years ago | 1

Answered
Rate limiter dynamics block and Discrete Derivative block
Double click that block and click "Help".

15 years ago | 1

| accepted

Answered
if vs switch
I guess you are asking to compare switch-case with nested if-elseif. I prefer switch-case. I think the efficiency is the same bu...

15 years ago | 4

| accepted

Answered
there are specified folders in an specified directory that contents of some of them are equals to contents of others
I suggest you use this: A_dir=dir(FolderA); B_dir=dir(FolderB); Then use isequal(A_dir,B_dir) to compare if all the f...

15 years ago | 1

Load more