已回答
Save variable to .mat file
try this: save(strcat(Name,'_waviness'),'waviness')

3 years 前 | 0

已回答
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 ...

3 years 前 | 0

| 已接受

已回答
Identifying missing values in matrices
try idx=~ismember(B,A) C=A(idx)

3 years 前 | 0

| 已接受

已回答
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

3 years 前 | 0

已回答
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...

3 years 前 | 0

| 已接受

已回答
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 ...

3 years 前 | 1

| 已接受

已回答
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 ...

3 years 前 | 0

已回答
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 ...

3 years 前 | 0

| 已接受

已回答
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...

3 years 前 | 0

已解决


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

3 years 前

已解决


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

3 years 前

已解决


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

3 years 前

已解决


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.

3 years 前

已解决


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

3 years 前

已解决


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

3 years 前

已解决


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

3 years 前

已解决


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

3 years 前

已解决


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

3 years 前

已解决


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

3 years 前

已解决


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

3 years 前

已解决


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.

3 years 前

已回答
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...

3 years 前 | 0

| 已接受

已回答
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

3 years 前 | 0

| 已接受

已解决


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

3 years 前

已解决


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

3 years 前

已解决


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

3 years 前

已回答
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 ...

6 years 前 | 1

已回答
How do I display list of folder (as text file)
files=dir sprintf('%s \n',files.name) fName=input('choose file:','s')

6 years 前 | 1

| 已接受

已回答
How to delete columns if there is'nt enough data?
prunedData = rmmissing(dataMatrix,2,'MinNumMissing',13)

6 years 前 | 0

已回答
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...

6 years 前 | 1

| 已接受

加载更多