Réponse apportée
decimal to fraction conversion
format rational 74./ 144 or if you would like to have numbers format rational [num, dem] = rat(74./ 144); ...

plus de 8 ans il y a | 3

Réponse apportée
Pause code until Excel file stored
This way might work. when you open and Excel file it generate a hidden file (i forget the file extend and I have not Excel right...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How to split the cell data?
Put your data in a text file, let say FileName.txt, then: TXT = fileread('FileName.txt'); Split = strsplit(TXT, {'.' ' '...

plus de 8 ans il y a | 0

Réponse apportée
Labeled rows and column in a matrix
Use table instead.

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
how could I use subplot function to squeeze 12 existing graphs into 2 pages of 2x3
h = 2.5:2:40.5; i=1; % ADD THIS LINE figure; % ADD THIS LINE for a = date1204:date...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
Up to what versions of MatLab can you still use textscan
http://www.mathworks.com/help/matlab/ref/textscan.html Matlab2016a accepts this code !

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Sub-Function help!
Based on the question it seems "Scores" is a N*3 matrix (N shows number of students). You should write a function that outputs A...

plus de 8 ans il y a | 0

Réponse apportée
how to compare two files line by line?
f = fopen('nv.txt'); fid = fopen('test.txt'); k = 0; while ~feof(fid) s1 = fgetl(fid); frewind(f) % start f...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Find the First element that satisfies a condition
If you dont mind a little coding: A = [7 3 9;5 8 8;0,2,6]; FirstCon = zeros(size(A,1),1); i=1; B = A'; % I am...

plus de 8 ans il y a | 0

Réponse apportée
crop a region of interest on images and create new files only with this region
Im = imread('ngc6543a.jpg'); %load your image image(Im) x_start = 50; % start x x_end = 500; % end x y_start = 50...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How do you clear the contents of a table?
It depends on the structure of your columns. The easiest way is to put NaN on the raw (if there is a numerical column), then yo...

plus de 8 ans il y a | 0

Réponse apportée
Change number of xlabel ticks to show
I have not get the question completely, if you want to plot just some points, you can just compute those points! otherwise you c...

plus de 8 ans il y a | 0

Réponse apportée
how to fixed specific results for times of implementation
Use rng(1,'twister') at top of your code. It controls random number generation functions and you will always see the sa...

plus de 8 ans il y a | 0

Réponse apportée
How to plot phase graph from csv with real and imaginary values?
It depends on what would you like to plot. But first you must define them as complex number for Matlab: z = complex(real, i...

plus de 8 ans il y a | 0

Réponse apportée
why showing assignment dimension mismatch?
this works correctly: data = rand(1,200); d=[5,8,2,9,4,1,8,0,3,8,1,4,9,4,9,25,3]; k=1; for z=1:1:d(k,2) ...

presque 9 ans il y a | 0

Réponse apportée
Problem with using && operator in if conditional statement with array involved
You should use one "&" if you have logical vectors. % Correct a = [1,2]; b = [3,4]; if a==a & b==b c...

presque 9 ans il y a | 0

Réponse apportée
I have a grid of cells and I want to get the average value of cells in the 7th column.
mean(cell2mat(name_of_table(:,7)))

presque 9 ans il y a | 0

Réponse apportée
How to eliminate value at each position required
for i=1:16; for j=1:16; for Tx=1:128; for Rx =1:128; if E{i,j}(Rx,Tx)==E{i,j}(31,119) ...

presque 9 ans il y a | 0

Réponse apportée
How many levels of the tree should I prune in my decision tree?
There is no certain number for that. One way is computing resubstitution error for different pruning level and find the place wh...

presque 9 ans il y a | 1

Réponse apportée
Need help with this question I was asked to preform
We are not going to give you the answer, since this is a basic question which is trying to teach you not only how should you cod...

presque 9 ans il y a | 0

Réponse apportée
how to find the column number of first zero element of each row
This is your answer: a =[ -1 3 0 0 0 0 2 3 4 5 0 0 1 2 1 ...

presque 9 ans il y a | 2

| A accepté

Réponse apportée
Nonlinear Regression w/ categorical predictors?
I am using Matlab R2014b and I have the same problem. It seems in Matlab R2015 this problem is solved since you can use not only...

presque 9 ans il y a | 0

Réponse apportée
how can i plot a periodic function such as sawtooth or gate function over a defined period
t = 10; % total simulation time T = 3; % period x = 0:0.1:t; % lets say your original function is y=2*x which repeate...

presque 9 ans il y a | 3

| A accepté

Réponse apportée
size gives contradictory results
If you want the size of your vector you should use the following comment: size(centers) "size centers" shows the size of...

presque 9 ans il y a | 1

| A accepté

Réponse apportée
When with rounding and precision
What you said is not true! for multiplication the exact number is : 0.998545000000000 p15 = 0.8683*1.15; r = round(p...

presque 9 ans il y a | 0

Réponse apportée
superscript/subscript in labels not working
x= 1:10; y=2*x; plot(x,y) ylabel('e^t') It works on Matlab R2014b, maybe the version that you are using does not s...

presque 9 ans il y a | 4

| A accepté

Réponse apportée
how can i calculate the sum of the following geometric series N= 1000 and r =0.99
N=0:1000; r = 0.99; E = r.^N; sum(E)

presque 9 ans il y a | 0

| A accepté

Réponse apportée
Too big classification tree
There are many ways to do that, e.g. compare the following tree1, tree2, and tree3. It depends on your problem in hand, which on...

presque 9 ans il y a | 0

| A accepté

Réponse apportée
MATLAB displays a blank graph when I plot try to plot
It is not empty, it has the points. Do the following change: change the plot line to plot(di(ii),slope(ii),'o')

presque 9 ans il y a | 0

| A accepté

Réponse apportée
How do you plot values from a cell array?
plot(cell2mat(strain_xx)) <</matlabcentral/answers/uploaded_files/45718/untitled.jpg>>

presque 9 ans il y a | 1

Charger plus