Réponse apportée
how to compute separate line 2 dimensional points
Once you have the plot, go to _tools_ -> _Basic fitting_ select the data (1 or -1 in your case), linear and click in the bott...

plus de 11 ans il y a | 0

Réponse apportée
How to rename variables in a loop?
you are not using _eval_ in the right way. You should do: x=3; eval('a = x') a = 3 Adapt the code t...

plus de 11 ans il y a | 0

Réponse apportée
How do i convert the following into exe?
Matlab compiler does not support symbolic toolbox You can read this thread too: <http://www.mathworks.com/matlabcentral/an...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
EXTRACT NUMBER FROM A COMBINED STRING AND NUMBERS
use _str2double_ to get it in double format: output = str2double(String(regexp(String , '[0-9]'))) output = ...

plus de 11 ans il y a | 0

Réponse apportée
how to load my file in to matlab?
Just write the name of the *.m file containing the data/script you want to load. Write it where you want it to run.

plus de 11 ans il y a | 0

Réponse apportée
How to store data while simulating a model?
You need to add two blocks to your model. 1) to save data, ad "To Workspace" block. This will send and save data into the wor...

plus de 11 ans il y a | 0

Réponse apportée
how to show my output data in map.
You will have to present your data by year: XX YY]= meshgrid(X1,Y1); z=ltm(:,:,1); surf(XX,YY,z') xlabel('XX') ...

plus de 11 ans il y a | 0

Réponse apportée
how to select certain elements from a matrix?
B=[90,0,40,0; 0,0,10,60; 55,15,0,10; 0,15,5,0]; [col row]=find(B==0); A= [row col] % coordinate...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
trouble with complicated loop
% You are playing with two differet indeces: _i_ and _M_. % You have to fix _i_ and then perform the summation: x=ra...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
how to show my output data in map.
you could take a look at the demos within Matlab documentation. You will find many working examples on data representation, like...

plus de 11 ans il y a | 0

Réponse apportée
how to make sum of (for loop)
the _for loop_: a = 3; % or whatever value you have in mind b = 2; % or whatever value you have in mind n = 10; % or ...

plus de 11 ans il y a | 0

Réponse apportée
Extract data from excel using heading
[data headings] = xlsread('your_excel.xls'); headings = headings(1,:);% first row of headings, in case you have some others...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Compare two columns in a matrix, perform if statement.
Your sample data is not very useful, but I think you are trying to do something like this: %sample data A=[-0.758061618...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Need help to form equations
a = rand(1,4); % your a matrix syms v1 v2 v3 v4 S = solve( a(1)*v1^2-a(2)*v2-a(3)*v3^2-a(4)*v4==0,... a(3)*v3^2-a(4)...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to combine 2 for loops
You were not very clear in your explanation, but I think you want this: id = [ 1 3; 2 6; 3 2; 4 5; 5 1; 6 4; 7 7]; c...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
button in a figure
try this: S.f = figure; S.h=plot(rand(10,1)); % creates a figure and plot something on it % create a pushbtton ( adapt i...

plus de 11 ans il y a | 1

Réponse apportée
how to correctly prompt user to enter only 1 real number,numeric value,that is within range...?
A=input('please enter only 1 number and make sure its in range: ','s'); while (isnan(str2double(A)) || str2double(A)<=4 ||...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Reduce the size of a vector
vect_45 = rand(1,45000); % your 1x45000 array vect_36 = vect_45(:,1:36000); vect_27 = rand(1,27000); % your 1x27000...

plus de 11 ans il y a | 0

Réponse apportée
Waterfall plot of a time series data
You can use _ncread_ to access your data within the netcdf file. ( From MATLAB documentation ) ncdisp('example.nc','peaks'...

plus de 11 ans il y a | 0

Réponse apportée
how to convert the solid line into dashed line in the images during overlay of images
h = plot(rand(10,1)); % this creates a handle to the figure set(h,'LineStyle','--') % this convert the solid line into ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Tic toc command giving erroneous result
The time taken to run both scripts are insignificantly different. There are only two lines of code of difference between them: ...

plus de 11 ans il y a | 0

Réponse apportée
Curve fitting for power equation
Use the curve fitting tool cftool % this will open the curve fitting tool interface From the user interface, select you ...

plus de 11 ans il y a | 0

Réponse apportée
when two individual number remain in one cell such as a cell contain [300;350]. then how can i extact a single value from the cell?
To extract elements form a cell: p{1}(1) % this will return first element of first cell p{3}(2) % this will return secon...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
how to create world file
If you mean _Word_ instead of _World_: Publish the file in Microsoft Word format. publish('Your_file.m','doc');

plus de 11 ans il y a | 0

Réponse apportée
How to print the first 100 primes including 1 as a vector
p = [1 primes(100)] p = Columns 1 through 19 1 2 3 5 7 11 13 17 19 23 ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How do I measure mean of every 10 data of a vector size 1x1500?
A = rand(1,1500); % your data M = zeros(1,150); % MEAN MATRIX for k=1:150 M(k) = mean(A(((k-1)*10+k):10*k)); e...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to intersect these lines?
I give you the code for two lines, you extend it to three (do it by pairs if true % code end): %For...

plus de 11 ans il y a | 0

Réponse apportée
How can we Plot a line passing through two points?
If you want a line connecting A and B: A = [2 3]; B = [4 5]; plot(A,B,'*') axis([0 10 0 10]) hold on line(...

plus de 11 ans il y a | 3

| A accepté

Réponse apportée
why can't i plot this function? :(
Try it this way: x = -5:.1:5; y = -5:.1:5; [x1 x2] = meshgrid(x,y); G2 = -(1+cos(12.*sqrt(x1.^2+x2.^2)))./(0.5.*...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
is it posible to create matrixplot for several data types?
I think -plotmatrix-does not have the option of holding the plot to add extra data. You can use _plot_ and _hold on_ instead: ...

plus de 11 ans il y a | 0

Charger plus