已回答
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...

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 0

已回答
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.

11 years 前 | 1

已回答
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...

11 years 前 | 0

| 已接受

已回答
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');...

11 years 前 | 0

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

11 years 前 | 0

已回答
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 ...

11 years 前 | 0

| 已接受

已回答
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 ...

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
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. ...

11 years 前 | 0

已回答
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 ...

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
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 ...

11 years 前 | 0

已回答
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 ...

11 years 前 | 0

已回答
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

11 years 前 | 2

| 已接受

已回答
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...

11 years 前 | 0

已回答
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]; ...

11 years 前 | 0

| 已接受

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

11 years 前 | 0

| 已接受

已回答
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]));

11 years 前 | 0

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

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
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 ......

11 years 前 | 0

已回答
4D plot around a cylinder
I am sorry to disappoint you, but the 4D plot is not yet available. You should choose 3 of your variables at a time and plot th...

11 years 前 | 0

| 已接受

已回答
is there any robust solution to Out of memory error in Windows 7 64 bit machine where MCR of 32 bit is installed?
You should install the MCR of the matlab version installed on the machine. If your application was created in a 32bit matlab ve...

11 years 前 | 0

已回答
How to change the colors in the plot?
plot(tt,xx(:,1),'b',,tt,xx(:,2),'r'); % one blue and the other red grid on xlabel('time') ylabel ('Theta'...

11 years 前 | 2

| 已接受

已回答
problem with %d in MATLAB
for k = 1:22 pic2read = strcat(num2str(k),'.dcm'); if k<10 pic2read = strcat('0',pic2read); en...

11 years 前 | 0

| 已接受

已回答
How to use fprintf?
fprintf('a= %g; b= %g; c= %g ',y(1),y(2),y(3)) % extend it until y(6)

11 years 前 | 1

| 已接受

已回答
varying image properties Using MATLAB slider
To make sure your slider initialize in any value of your liking, place the _set_ function on the start-up function of your GUI. ...

11 years 前 | 0

| 已接受

已回答
how to unzip files using loop?
zip_files = dir('*.zip'); for k = 1:numel(zip_files) unzip(zip_files(k).name,'output_directory_here'); end

11 years 前 | 6

加载更多