Réponse apportée
Save variable to .mat file
try this: save(strcat(Name,'_waviness'),'waviness')

plus de 3 ans il y a | 0

Réponse apportée
How to reference points in time in a matrix?
a=[ 0 0 0 0] a=[a; 0 0 0 0] a=[a; 0 0 0 0] a=[a; 0 0 0 0] a=[a; 0 ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Identifying missing values in matrices
try idx=~ismember(B,A) C=A(idx)

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
load data cell from Mat file from Matlab file
clearvars; clc; ss=load('matlab_t.mat','unnamed'); %% I would like this to be ss=[1;2;3] ss=ss.unnamed

plus de 3 ans il y a | 0

Réponse apportée
How to make unfilled plot points?
Think you'll find it's due to the linewidth - change it to 1 and they shouldn't be filled. MarkerSize changes the size of the po...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
rng() throwing error
Not really sure: only thing that springs to mind is something shadowing the Matlab function? what do get when you type: which ...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
How to remove vectors values with restraints?
A = [ 0.1 0.2 0.4 0.6] B = [ 0.5 0.9 0.6 0.2] C=(A+B)<1 A=A(C) B=B(C) C = 1×4 logical array 1 0 0 ...

plus de 3 ans il y a | 0

Réponse apportée
How to save the results of all iterations?
Something like this? R=1.1/100; %m k=1; %W/m.K rho=1100; %kg.m^3 Cp=4180; %J/kg.K h=2700; %W.m^2.K ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
For Loop Indexing exceeding array elements
First run of the loop you are overwriting the z vector with a scaler if k <= 1 z=5; mu = 0; On...

plus de 3 ans il y a | 0

A résolu


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

plus de 3 ans il y a

A résolu


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.&#8519;^(-&lambda;t)*cos(2πft)| where |A|, |&lambda;|, and |f| ...

plus de 3 ans il y a

A résolu


Solve a System of Linear Equations
*Example*: If a system of linear equations in _x&#8321_ and _x&#8322_ is: 2 _x&#8321;_ + _x&#8322;_ = 2 _x&#8321;...

plus de 3 ans il y a

A résolu


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

plus de 3 ans il y a

A résolu


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

plus de 3 ans il y a

A résolu


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

plus de 3 ans il y a

A résolu


Return the first and last characters of a character array
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

plus de 3 ans il y a

A résolu


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

plus de 3 ans il y a

A résolu


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

plus de 3 ans il y a

A résolu


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

plus de 3 ans il y a

A résolu


Return area of square
Side of square=input=a Area=output=b

plus de 3 ans il y a

A résolu


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

plus de 3 ans il y a

Réponse apportée
how to save the results obtained by a for loop repeated n times
AC = [100 2; 110 4; 105 3; 130 7; 120 5; 115 5; 115 3; 140 7; 110 9; 105 4; 110 3; 120 5 ]; A = 3; function [C] = Trend(A...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Multiplication of elements of matrix without using for loop
A.*B ans = 1.0000 1.0000 0.9999 0.2500 0.4000 0.4998 0.1400 0.2400 0.3333

plus de 3 ans il y a | 0

| A accepté

A résolu


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

plus de 3 ans il y a

A résolu


Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

plus de 3 ans il y a

A résolu


Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

plus de 3 ans il y a

Réponse apportée
Explanation of num2str(x) - '0'
num2str(x) - this converts the number to a string Once converted subtracting '0' subtracts the character code for 0 from all ...

environ 6 ans il y a | 1

Réponse apportée
How do I display list of folder (as text file)
files=dir sprintf('%s \n',files.name) fName=input('choose file:','s')

environ 6 ans il y a | 1

| A accepté

Réponse apportée
How to delete columns if there is'nt enough data?
prunedData = rmmissing(dataMatrix,2,'MinNumMissing',13)

environ 6 ans il y a | 0

Réponse apportée
How to add a small random number to all values in a matrix
testMatrix=[1 2 3;4 5 6;7 8 9] noise=(rand(size(testMatrix,1),size(testMatrix,2))-0.5)./5 testMatrix=testMatrix-nois...

environ 6 ans il y a | 1

| A accepté

Charger plus