Answered
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...

8 years ago | 2

Answered
Hello I have a question with struct()
S = sum([output.timediff]);

8 years ago | 0

| accepted

Answered
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...

8 years ago | 0

| accepted

Submitted


tprintf
tprintf writes tabular data to a text file

8 years ago | 2 downloads |

0.0 / 5
Thumbnail

Answered
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(...

8 years ago | 1

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

8 years ago | 1

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

8 years ago | 0

| accepted

Answered
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...

8 years ago | 1

| accepted

Answered
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{...

8 years ago | 2

| accepted

Answered
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...

8 years ago | 0

Answered
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...

8 years ago | 0

Answered
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 (...

8 years ago | 0

Answered
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. *...

8 years ago | 0

Answered
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 ); ...

8 years ago | 0

Answered
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...

8 years ago | 0

| accepted

Answered
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...

8 years ago | 0

| accepted

Answered
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 *...

8 years ago | 1

| accepted

Answered
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. ...

8 years ago | 1

| accepted

Answered
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...

8 years ago | 0

Answered
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...

8 years ago | 0

| accepted

Solved


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

8 years ago

Solved


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...

8 years ago

Answered
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 ...

8 years ago | 0

Answered
reading a txt file including dash
One way %% fid = fopen( 'DI_WATER.txt' ); cac = textscan( fid, '%f%f%f%f%f%f%f%f' ... , ...

8 years ago | 0

| accepted

Answered
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...

8 years ago | 0

| accepted

Answered
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...

8 years ago | 4

| accepted

Answered
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(:,:,...

8 years ago | 2

| accepted

Answered
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 ...

8 years ago | 2

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

8 years ago | 1

| accepted

Answered
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...

8 years ago | 0

| accepted

Load more