已回答
Markers intersect with axis in MATLAB plot
Set the axis according to your data, extending the limits to your need: x= rand(10,1); y = rand(10,1); loglog(x,y,'ko...

11 years 前 | 0

已回答
how to run a .mfile in a loop and to save results of each itteration seperatly
You have to make some changes in your code. Create a cell array to hold your data. my_data_cell = cell(size_of_data, N_iter...

11 years 前 | 0

| 已接受

已回答
How to convert and display numbers into strings
for k=1:1000 if k<10 tmp_str = 'K=000'; elseif k<100 tmp_str = 'K=00'; elseif k>=10...

11 years 前 | 0

| 已接受

已回答
Array - Determine parameters (least number picked etc)
%Generate integer values from the uniform distribution on the set 1:10: r = randi(10,2500,1); % 2500 randomly distributed n...

11 years 前 | 0

已回答
Signal to Work space- How to use?
that's due to the inherent delays within the processing time taken by your machine.

11 years 前 | 0

已回答
Renaming of Structure field inside a Structure with data inside the field
I think this is what you are looking for: my_struct.name = 'xxxx.txt'; % sample struct new_field = my_struct.name(1:end-...

11 years 前 | 0

已回答
Putting together matlab plots into one
the first 2 indexes in _subplot_ are the number of row and column plots in your figure. subplot(2,4,1) % your plot comom...

11 years 前 | 1

已回答
Can I create a matrix other than 3*3 matrix in Simulink
Simulink does not have a block to calculate the inverse matrix above 3x3.

11 years 前 | 0

| 已接受

已回答
How can I solve "Invalid object handle" error when trying to open a .fig?
Try doing it with a figure handle: h = figure; plot(1:4,5:8) saveas(h,'my_fig.fig')

11 years 前 | 0

已回答
how to stop for loop?
_break_ will exit the inner for-loop. for j=rr-3 for i=1:rr-1 if X(i)<=t(j) && t(j)<=X(i+1) ...

11 years 前 | 0

已回答
Calling and Using function file to adjust plots
Place the function m-file in the same folder of your script. within your script, just write down the call to the function: ...

11 years 前 | 0

| 已接受

已回答
adding multiple images together from a for loop
Try this out: E = []; for i = 1:4 str = int2str(i); str = strcat('\',str,'.jpg'); str = strcat('C:\Users...

11 years 前 | 0

| 已接受

已回答
I would like to know the syntax for plotting two y axes and single x axis for multiple line plots..
x1=[0 2 4 6]; x2=[0 2 4 6 8 10]; x3=[0 2 4 6 8 10 12]; y1=[70 80 90 100]; y2=[85 95 100 105 110 112]; y3=[95 96...

11 years 前 | 0

已回答
How can I skip lines when reading from a text file
You could try the built-in function _fgets_: fid = fopen('my_file.m'); % read the first 36 lines and do nothing to the...

11 years 前 | 4

| 已接受

已回答
uicontrol popup 0 selection problem
You are not popping up the selected value but the position of the selected value. Since you start at _0_, it looks it pops up th...

11 years 前 | 0

| 已接受

已回答
set handles function for char data.
Your listbox has to have a tag assigned (look for it in the property inspector). The values you want to insert into your listbox...

11 years 前 | 0

| 已接受

已回答
Niggle with a ``simple'' if-else structure.
Instead of elseif 10<a<20 do the following: elseif ( (a>10) && (a<20) )

11 years 前 | 0

| 已接受

已回答
how to find correlation of a single image?
To measure correlation you need at least two images.

11 years 前 | 0

已回答
Decomposition in any base Matlab
I don't know whether you checked it out or not, but _dec2base_ is a MATLAB built-in function. Type the following in the comman...

11 years 前 | 0

| 已接受

已回答
Add some data line to 3D plot
use the _line_ command: M=rand(30,3); % sample data plot3(M(:,1),M(:,2),M(:,3),'*') grid on xlabel('X') ylabel(...

11 years 前 | 0

已回答
saving a structure in mat file
When using _save_, the name of the variable to be saved has to be a string: s.name='ww'; s.age=22; save('test.mat','s...

11 years 前 | 10

| 已接受

已回答
function refresh value when variable changes (pass by reference)?
Your question is answered in another post, follow the link: < http://www.mathworks.com/matlabcentral/answers/152>

11 years 前 | 0

已回答
saving structures in a database and retrieve the fields data
I hope the following helps you: var_found = 22; % variable found in database %example struct s.name='ww'; s.age=22...

11 years 前 | 0

已回答
sector of a circle
sector_end = your_value_here; r = radious; t=0:.01:sector_end; x=r*cos(t); y=r*sin(t);

11 years 前 | 0

已回答
how to split and store it into one arrray?
I = your_image; [rows,cols] = size(I); % dimensions of your image M = cell(8,8); for k=1:8 for l = 1:8 ...

11 years 前 | 0

已回答
Is it possible to get a relationship between two vectors in matlab?
plot(x,y) will do the trick, as long as _x_ and _y_ are of the same length.

11 years 前 | 0

已回答
How to create mat file for 60 colour images
my_images = dir('*.png'); % adapt to your images extension I = cell(numel(my_images),1); % initialize a cell ...

11 years 前 | 0

已回答
About controlling Simulink model execution at run time
You can use the following commands to control the simulink model: set_param(gcs,'SimulationCommand','Pause'); set_param(...

11 years 前 | 0

已回答
read replace decimals ,. commas to dot from txt files
The comma is an issue in Matlab, could you use dots instead? -0.229447 0.003749 0.003599 -0.056431 2.009800 1.0036...

11 years 前 | 0

已回答
textscan for string with white spaces
Try _horzcat_ to concatenate strings with empty spaces. Example 1: str_1 = 'test'; str_2 = ' '; % empty space str_...

11 years 前 | 0

加载更多