Answered
how to save in specific row and column with this code in excel?
Instead of writing values one at a time on each iteration, you should better save the values in an array and then write the whol...

12 years ago | 0

Answered
how to save in specific row and column with this code in excel?
To write in a precise cell within a xls file, use the built-in function _xlswrite_, which gives that feature. Example from do...

12 years ago | 1

Answered
can use xlswrite in for loop without overwriting?
With _xlswrite_, you can define the cell where your data will be written, like in the following example, that write mixed text a...

12 years ago | 3

Answered
How can I create a specific matrix in a for loop?
what's the reason behind the "20" in the 5th line of your code? [M N] = size(x); % M number of rows, N number of column ...

12 years ago | 1

Answered
Symbolic Math toolbox- Lie derivative
No, you have to code the equations to perform the Lie derivative yourself.

12 years ago | 1

| accepted

Answered
How to read .ini file dynamically during runtime using standalone application created using Matlab Compiler
You can use the _uigetfile_ function within your GUI main *.m file. [FileName,PathName] = uigetfile('*.ini','Select the INI...

12 years ago | 0

Answered
Update plot on Axes in a Matlab GUI
Take a look at the _drawnow_ command. You will need it to draw your plot as the simulation goes. doc drawnow

12 years ago | 0

Answered
Could not solve 2 equations using the MATLAB.
No need of symbolic calculus. Apdapt the example to your equations: This example solves the system of two equations and two u...

12 years ago | 0

| accepted

Answered
Is the a matlab function that approximates the derivative of a function?
From Matlab documentation: Y = diff(X) calculates differences between adjacent elements of X. Examples: The quan...

12 years ago | 0

Answered
Find intersectional points of two discrete functions?
C = intersect(A,B) returns the values common to both A and B. The values of C are in sorted order.

12 years ago | 1

Answered
with the plot is there possible to write name ?
For example: If your _plot_ command goes like: plot(x1,y1,x2,y2,x3,y3,x4,y4,....); % plotting xith against yith add the...

12 years ago | 0

| accepted

Answered
Load command for giving input from text file?
This example may be of help (taken from documentation): x = 0:.1:1; y = [x; exp(x)]; fid = fopen('exp.txt', 'w');...

12 years ago | 0

Answered
finding some eigenvalues using eigs
I hope it helps: greater_array = find( my_eigenvalue_array > -a ); wanted_eig_array = find (greater_array < a );

12 years ago | 0

Answered
Can Anybody Please tell me how to capture an image in MATLAB after every pre-determined delay from the web-cam? Its really important please help.
you need to use the built-in function _getsnapshot_: obj = videoinput('matrox', 1); while 1 ...

12 years ago | 0

| accepted

Answered
Replacing alternate columns of matrix with another matrix
A= [1;2;3]; B = [4 7 10; 5 8 11; 6 9 12]; C = zeros(size(B,2),size(B,1)*2); % initialize C for ...

12 years ago | 0

Answered
how to print output in gui
A more simple approach is the use of _set_: set(handles.your_text_object_in_GUI,'String','your_string_to_display'); In...

12 years ago | 0

Answered
aligning text in plots
It depends on your plotted data. text(x,y,'your_text') will draw _your_text_ in the position (x,y) within your figure. ...

12 years ago | 0

Answered
how to read data from multiple files and save in single file
my_files = dir('*.txt'); N_files = numel( my_files ); A = zeros( numel(my_files),50 ); % initialize matrix to hold data ...

12 years ago | 0

Answered
How to Put Data into table?
From Matlab documentation ( adapt it to your needs ): f = figure('Position',[200 200 400 150]); dat = rand(3); cname...

12 years ago | 0

Answered
Storing output from each FOR LOOP ititeration in MATLAB
ClusteringCoefficient = cell(3,1); % initialize empty cell array my_data = zeros(512,512,3); % initialize empty matrix to h...

12 years ago | 0

Answered
The letter 'f' seems to be cut off in the ylabel of a saved figure
It all has to do with the way Matlab saves the images. There is no any other way to save the image with your given settings but ...

12 years ago | 0

Answered
Getting average of a single row of data
I think your problem is in: Seg1.average_power(index) What's the size of _Seg1.average_power_? Make sure you can fit ...

12 years ago | 0

Answered
Draw circle with given data.
t=0:.1:2*pi; radius = 3; x=radius*cos(t); y=radius*sin(t); plot(x,y) axis square

12 years ago | 2

| accepted

Answered
displaying values in command window
I hope this is what you want to do: my_var = 3; fprintf('The value of my variable is : %g \n' ,my_var); OUTPU...

12 years ago | 0

Answered
Plotting a polynomial represented by a vector
From MATLAB documentation: The polynomial p(x) = 3x^2 + 2x + 1 is evaluated at x = 5, 7, and 9 with p = [3 2 1]; ...

12 years ago | 0

| accepted

Answered
how do I make first name of my struct variable?
List = 'test' ; eval(strcat(List,' .a = 1')); test = a: 1

12 years ago | 0

| accepted

Answered
How to index all columns but one in a matrix?
% no need of a new matrix, remake the old one: A = exp(A(:,[1:2,4]));

12 years ago | 0

Answered
how to find the inverse of a 2x2xm matrix?
a=rand(2); % example matrix b=inv(a) % inverse matrix

12 years ago | 0

Answered
Arduino and Serial port in MATLAB
You have to close the serial object once you are done with it: s1 = serial('COM1'); % create serial object, it will be some...

12 years ago | 0

Answered
Matlab Function Block reading erroneous values
f changes value when p>90 and y=0 whatever happens to p, then, you go through a nested condition: if f==1 if p>60 ......

12 years ago | 0

Load more