Réponse apportée
Can't find where the warning msg is from
Matlab fails to provide a meaningsful error message in this situation. It's left to the user to provide a work-around. Here i...

plus de 8 ans il y a | 2

Réponse apportée
Hello I have a question with struct()
S = sum([output.timediff]);

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How to assign index to array
Try >> M(:,end+1) = reshape( [1:size(M,1)], [],1 ); >> M M = 1 3 4 9 1 3 5 5...

plus de 8 ans il y a | 0

| A accepté

A soumis


tprintf
tprintf writes tabular data to a text file

plus de 8 ans il y a | 2 téléchargements |

0.0 / 5
Thumbnail

Réponse apportée
Guide program - calculation of multiple data sets
Without details it is difficult to be specific. compile a "list", |sad|, of the files of the selected folders sad = dir(...

plus de 8 ans il y a | 1

Réponse apportée
How To Detect Special Characters
>> str = regexp( '1asdf?', '[^\w]', 'match' ) str = '?' where I defined *not* being special as _"Any alphabetic,...

plus de 8 ans il y a | 1

Réponse apportée
How can I create matrices out of a matrix?
L1_sample = L1( 1, : ); L1_remain = L1( 2:end, : ); should do it - I think

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
whenver i insert this if statement inside a for loop, i get an error. Could someone please explain why? Much appreciated!
*Comments* * *|isdouble|* is a special function of <https://uk.mathworks.com/help/fixedpoint/ref/isdouble.html the Fixed Poin...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
How fprintf cell array and martix?
%% xx={'2017032312_8953';'2017032312_8978'}; yy=[10;11]; for jj = 1 : length( xx ) fprintf( '%s %3.1E \n', xx{...

plus de 8 ans il y a | 2

| A accepté

Réponse apportée
How to Reduce Computation Time
The code analyzer box in the upper right corner tells you that there is potential for improving the code. Hovering over the smal...

plus de 8 ans il y a | 0

Réponse apportée
How to generate random numbers between two numbers without any specific number?
_"[...] without any specific number?"_ &nbsp; I don't understand that. However, try >> 2 + rand*(33-2) ans = 26.8...

plus de 8 ans il y a | 0

Réponse apportée
Memory problem reading data in large netcdf files for a single variable
Am I correct that you want to calculate the statistical measures (min, max, etc.) for 684x447 time series of 3250 hours length (...

plus de 8 ans il y a | 0

Réponse apportée
Help debugging a code? Says function makes an error but when I run it, it returns the correct output...
IMO: Your code is a nightmare to debug and I will not try. There is a problem with *|output|*. It's not used as output. *...

plus de 8 ans il y a | 0

Réponse apportée
Converting a string Array into a Char array
_"My intentions are to graph time vs. temp."_ %% [date, time, temp ] = textread('h:\m\cssm\data.txt','%s %s %f', 8 ); ...

plus de 8 ans il y a | 0

Réponse apportée
how to subplot data from two matrix using for loop?
Problems with your code * *|A(i)|* outputs a scalar. You want *|A(:,i)|*, which outputs the i:th column * your code displaye...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How do I go about using my MATLAB knowledge and transfer that to real world applications?
*MATLAB* &nbsp; The Mathworks have developed the Matlab programming language significantly over the last decade. Opinions expres...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Function [output]=FunctionName(input)
Go to <https://uk.mathworks.com/help/matlab/matlab_prog/create-functions-in-files.html Create Functions in Files> and look for *...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
Importing cnv file with header lines
Given * the entire file fits in a fraction of the memory * **END** is the last line before the numerical part of the file. ...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
How do I make a list of objects that have specific properties?
An alternate approach %% Create some data loc = randi( [double('A'),double('D')], 1,8 ); loc_str = arrayfun( @char, l...

plus de 8 ans il y a | 0

Réponse apportée
Operations on variables with specific naming patterns
It's easier to say that dynamically named variables and *|eval|* is not a good idea than making recommendation regarding a desig...

plus de 8 ans il y a | 0

| A accepté

A résolu


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

plus de 8 ans il y a

A résolu


Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

plus de 8 ans il y a

Réponse apportée
How to convert .mat file into text file in a specific format ?
I assume that the mat file contains a cell array named, *|x|* %% x={ 0.000000, 0.000000 0.500000, 0.333333 ...

plus de 8 ans il y a | 0

Réponse apportée
reading a txt file including dash
One way %% fid = fopen( 'DI_WATER.txt' ); cac = textscan( fid, '%f%f%f%f%f%f%f%f' ... , ...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How to remove first charachter from a string inside a cell
One way with R2016a >> load 20_SVO.MAT >> data_SVO(:,3:4) = regexprep( data_SVO(:,3:4), '\$', '' ); >> data_SVO da...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
What's the cost of overwriting a variable versus clearing it every time it changes?
Comments * don't speculate; make a test * make it a habit to use the function, *|profile|* * see <http://wiki.c2.com/?Prem...

plus de 8 ans il y a | 4

| A accepté

Réponse apportée
How to convert from cell array to multidimensional array?
Loops are allowed if one remember to pre-allocate %% num = nan( 7, 7, 6, 10000 ); for jj = 1 : 10000 num(:,:,...

plus de 8 ans il y a | 2

| A accepté

Réponse apportée
Really easy one how to quickly repeat columns in an array
C = (1:10)'; M = repmat( C, [1,10] ); inspect the result >> whos C M Name Size Bytes Class ...

plus de 8 ans il y a | 2

Réponse apportée
Seperating strings and numbers using xlsread
Loops are allowed >> [ str, num ] = cssm0(); >> whos str num Name Size Bytes Class Attributes...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
How to store two tables resulting from a for loop
Yes, with something like this for jj = 1 : 2 T = something; filename = sprintf( 'myfile_%d', jj ); w...

plus de 8 ans il y a | 0

| A accepté

Charger plus