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

fast 9 Jahre vor | 2

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

fast 9 Jahre vor | 0

| akzeptiert

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

fast 9 Jahre vor | 0

| akzeptiert

Gesendet


tprintf
tprintf writes tabular data to a text file

fast 9 Jahre vor | 95 Downloads |

0.0 / 5
Thumbnail

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

fast 9 Jahre vor | 1

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

fast 9 Jahre vor | 1

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

fast 9 Jahre vor | 0

| akzeptiert

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

fast 9 Jahre vor | 1

| akzeptiert

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

fast 9 Jahre vor | 2

| akzeptiert

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

| akzeptiert

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

etwa 9 Jahre vor | 0

| akzeptiert

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

etwa 9 Jahre vor | 1

| akzeptiert

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

etwa 9 Jahre vor | 1

| akzeptiert

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

etwa 9 Jahre vor | 0

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

etwa 9 Jahre vor | 0

| akzeptiert

Gelöst


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

etwa 9 Jahre vor

Gelöst


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

etwa 9 Jahre vor

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

etwa 9 Jahre vor | 0

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

etwa 9 Jahre vor | 0

| akzeptiert

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

etwa 9 Jahre vor | 0

| akzeptiert

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

etwa 9 Jahre vor | 4

| akzeptiert

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

etwa 9 Jahre vor | 2

| akzeptiert

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

etwa 9 Jahre vor | 2

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

etwa 9 Jahre vor | 1

| akzeptiert

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

etwa 9 Jahre vor | 0

| akzeptiert

Mehr laden