Réponse apportée
Saving and opening Matlab file
"Except the plot dosen't show" Matlab doesn't recognise it as Matlab code. The extension, .mat, indicates data. See Save and...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Search through every vector in cell array for the vector that contains a certain value
Try this %% nodey = {[1,2],[3,4]}; %% has_one = false(1,length(nodey)); for ii = 1:length(nodey) has_one(ii) = ismembe...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
how to get answer from tic tok command that stays on the screen
Replace toc by elapsed_time = toc; which saves the elapsed time iin the variable, elapsed_time. And add elapsed_time af...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
convert to integer numbers
There are four different functions, which round to whole numbers round Round to nearest decimal or integer ceil Round towa...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Display a new matrix
This should do it: >> p=1; >> [A(1:p,:),B(1:p,:)] ans = 1 2 3 4 0 >> p=2; >> [A(1:p,:),B(1:p,:)] ans...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Add element to a given vector
One way >> x = 1:6 x = 1 2 3 4 5 6 >> x(end+1)=17 x = 1 2 3 4 5 6 17 ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Undefined function 'equation' for input arguments of type 'double'
This is my guess function x = equation( M, epsilon, tol ) h = 1e-8; x = pi/6; % first guess foo = @(x) M+epsil...

plus de 6 ans il y a | 0

Réponse apportée
Extracting Data field of a Series in HTML file
I misunderstood your question. This is a bit of overkill. Assumptions the string, series:, always indicates the start of a blo...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
DataStore function returns an error
I use R2018b >> version ans = '9.5.0.944444 (R2018b)' The example of the help on datastore works as expected in the ...

plus de 6 ans il y a | 0

Réponse apportée
Hello, I want to merge a big matrices row by row
Try this >> m1=ones(3,3); >> m2=2*ones(3,3); >> M = nan( 6, 3 ); >> M(1:2:end,:)=m1; >> M(2:2:end,:)=m2; >> M M = 1...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Why is there a syntax error for my code?
I don't think the problem is with your code, but rather with the users input. input( 'Please input ... ' ) expects an expression...

plus de 6 ans il y a | 0

Réponse apportée
How to vectorize string/char array concatenation with 'newline' characters for fprintf?
This statement should do it xmlOutString = strjoin( xmlData, '\n' );

plus de 6 ans il y a | 2

| A accepté

Réponse apportée
read ASCII data with varying lengths of space as delimiters
subset.txt is a fixed-width text file. No doubt about that. Since R2018b (R2017a?) it is straight forward to read fixed-width t...

plus de 6 ans il y a | 0

Réponse apportée
How to avoid Matlab inbuilt functions when executing F11 command to understand the code step by step?
"Is there any way to avoid the matlab inbuilt functions?" Alternately use F11 and F10. I guess it's possible to write a condit...

plus de 6 ans il y a | 0

Réponse apportée
Finding odd and even values without functions
Try this >> a=1:12 a = 1 2 3 4 5 6 7 8 9 10 11 12 >> (-1).^[a]==1 ans = 1×...

plus de 6 ans il y a | 1

Réponse apportée
textread() for Importing Values into Multi-Column Matrices
"is there were a way to specify that the output of the textread" See textscan, 'CollectOutput', true "Is this possible with t...

plus de 6 ans il y a | 0

Réponse apportée
Write/read binary files
This script %% ffs = 'test.bin'; X = 1+2i; %% write codes fid = fopen(ffs,'w','ieee-be'); tmpdatR = real((X)); tmpdatI ...

plus de 6 ans il y a | 0

Réponse apportée
How to know which toolboxes i am implementing
See matlab.codetools.requiredFilesAndProducts and How to list all function dependencies in v2016

plus de 6 ans il y a | 0

Réponse apportée
How to plot a 3 dimensional array
See 2-D and 3-D Plots

plus de 6 ans il y a | 0

Réponse apportée
why does matlab tell me that the "chop" command doesn't exist?
Make sure that you have the Control System Toolbox. chop() is a function in that toolbox. >> product_info = ver('control') pro...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How can I sum the elements in a vector row without using the sum function or any form of loops?
This is one way >> vec = (1:12); >> vec*ones(12,1) % replace '12' by length(vec) ans = 78 and check if that's the corre...

plus de 6 ans il y a | 2

Réponse apportée
How to extract specific rows & columns from a text file
See Read formatted data from text file or string and try fileID = fopen(filename); net_names = textscan( fileID, '%s%*f%*f%f...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Same Rows between two matrix
See setdiff, Set difference of two arrays and try >> setdiff( A, B, 'rows' ) ans = 0×2 empty double matrix >> setdiff( ...

plus de 6 ans il y a | 0

Réponse apportée
Getting a j x k Matrix from j and k-dimensional Vectors Without a For Loop?
See Matrix multiplication >> J*K' ans = 4 5 8 10 12 15

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
set class property only once
Here is an minimal working example of the design, which I think OP tried to implement. That is, use the fact that "MATLAB® evalu...

plus de 6 ans il y a | 0

Réponse apportée
Save a non scalar struct
The variable ss isn't saved between the calls of fun(). For the struct saved, only ss(4).bv is defined. That's the way Matlab w...

plus de 6 ans il y a | 0

Réponse apportée
Subscripted assignment dimension mismatch
See for loop to repeat specified number of times and note especially, "[...]Avoid assigning a value to the index variable within...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
column to multiple row conversion
Try col = rand(366,1); % sample data mat = col2mat( col, 2020 ); and col = rand(365,1); % sample data mat = col2mat( col )...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to Read and plot CSV file and delete infinity values from CSV file
Matlab provide many ways to read your csv-files. Here are two variants based on textscan, Read formatted data from text file or...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
size of matrices in a struct
"add all the sizes of matrices" , but your code adds the heights (i.e. the number of rows). What exactly do you mean by "all si...

plus de 6 ans il y a | 1

| A accepté

Charger plus