Réponse apportée
How to spline 163 data points into 100 data points?
I expect you want to use the spline method in the interp1 function. It may be possible to give more specific help if you upload ...

3 mois il y a | 0

Réponse apportée
1-Way Repeated ANOVA
I don't have any experience with this type of modeling, but it looks like you should be able to use fitrm followed by ranova on ...

3 mois il y a | 0

Réponse apportée
How to cycle through elements in an array in Matlab
You can utilize the same idea. Just offset by one inside outside mod(): A = [2 3 5 7]; % Illustrate the mod() cycle with off...

3 mois il y a | 2

| A accepté

Réponse apportée
Why does this code give error?
It's because randi(1,Nb) generates an Nb*Nb array. You need randi(1,Nb,1) as below clear;clc; fc = 3e8; Nb = 1000; %% ...

3 mois il y a | 0

| A accepté

Réponse apportée
plot legend shows wrong linespec
The syntax you are using created a plot with 402 "lines". The first 401 are red, and the last one is blue. load('data') % I di...

3 mois il y a | 1

Réponse apportée
want to use output matrix obtained for every iteration of a for loop in another for loop.
Here are two possibilities: % Save into cell arrays nsmall = 4; mcell = cell(nsmall,1); for k = 1:nsmall mcell{k} = ran...

3 mois il y a | 0

| A accepté

Réponse apportée
How to add a cumulative constant to all values on each row of a matrix, starting from the bottom row and ending at the top row?
There are many ways to do this. Here is one way: % Inputs in = [1 2 3; 1 2 3; 1 2 3]; constant = 0.5; % Algo...

3 mois il y a | 1

| A accepté

Question


Score transform for RUSBoost in fitcensemble
The documentation for the predict function of fitcensemble lists the score transforms (to convert scores to probabilities) for t...

3 mois il y a | 1 réponse | 0

1

réponse

Réponse apportée
How to fix "Error using /, Matrix dimensions must agree"
Take a look at the documentation on Array vs. Matrix Operations. I used element-wise division (using ./ rather than /) in your ...

3 mois il y a | 0

| A accepté

Réponse apportée
How to run logistic regression with state variables?
When you specified the model as modelspec1 = 'DefaultFlag ~ Dist_to_DFLT*CreditStateCategory - Dist_to_DFLT:CreditStateCategory...

3 mois il y a | 0

| A accepté

Réponse apportée
How to fix matrix dimensions
In this expression Q/pi*sigmaz*sigmay*u only pi is going to be in the denominator. Since your expression bears some resemblan...

3 mois il y a | 0

| A accepté

Réponse apportée
Building an array of strings that might be empty
If the fields are empty strings, your first syntax will not concatenate them. It will make them into a string array: app.XminEd...

3 mois il y a | 0

Réponse apportée
How to convert dates into Julian dates?
Assuming your dates are currently stored as a numeric array, then dates = [20230409 20230414 20230504 20230514 2023...

4 mois il y a | 0

| A accepté

Réponse apportée
The Tsunami model has need to fixed this problem
Disclaimer: I am not an expert in this! I was not able to track down the exact (Goring & Reichlan) reference from the documenta...

4 mois il y a | 0

Question


Dictionary with key-value pair of string ---> string array?
Using the older containers.Map object, I can map a string to a string array: keySet = ["Jan";"Feb";"Mar"]; valueSet = {["New Y...

4 mois il y a | 1 réponse | 0

1

réponse

Réponse apportée
why the plot are all zeros?
If you set a breakpoint at the code % Update number of processing tasks on neighbor vehicle numVehicleTasks(j) = numVehicleTas...

4 mois il y a | 0

Réponse apportée
Moving the position of the colorbar label
It is possible to do so. I found out how from this answer. figure surf(1e7*peaks) c = colorbar; drawnow() c.Ruler.Seconda...

4 mois il y a | 1

| A accepté

Réponse apportée
Minimize the sum of squared errors between the experimental and predicted data in order to estimate two optimum parameters
If you have the Statistics and Machine Learning Toolbox, you can use fitnlm to fit this function. Unless I'm making a mistake i...

4 mois il y a | 0

Réponse apportée
for loop jump an element of an array
You should not use strict equality to compare floating point numbers. Instead, check equality with a small tolerance, e.g. if ...

4 mois il y a | 0

Réponse apportée
how to build a magic matrix manually of even n*n matrix?
The method that MATLAB uses to build magic squares is evident if you enter type magic at the command line.

4 mois il y a | 0

Réponse apportée
How to place the x axis pointing downward and the y axis horizontally?
I'm not 100% certain I understand, but here are steps toward what I think you want. Use some or all of them. First version, I a...

4 mois il y a | 0

Réponse apportée
how to build a magic matrix manually of even n*n matrix?
Yours is an algorithm question, not a MATLAB question. You can find an algorithm for both singly-even and doubly-even magic squ...

4 mois il y a | 0

Réponse apportée
how to fill circle markers with crosses?
I'm guessing it's a bit sloppy for your purposes, but one can overstrike plots with two markers: rng(31) x = rand(7,1); y = r...

4 mois il y a | 2

| A accepté

Réponse apportée
why do i get 'off', 'Octave:abbreviated-property-match' error warning in eeglab?
The fact that you reached line 202 presumably means you are in an Octave environment, not a MATLAB environment. (I'm guessing th...

4 mois il y a | 0

Réponse apportée
model spec 'polyijk' o=in fitlm does not work as per MATLAB documentation?
I think you are just misinterpreting the Wilkinson notation of the model spec in the output. x1*x2 % note the * for interaction...

4 mois il y a | 0

| A accepté

Réponse apportée
Plotting 3D functions
You used exp as if it were a constant (e) that is raised to a power. Instead, you should have used it as a function. You also u...

4 mois il y a | 1

| A accepté

Réponse apportée
How to calculate center of pressure given a 2d array containing pressure data
If the answers to both of the questions in my comment is "yes", then % Example input pressureArray = [1 2 3; 4 5 6; ...

4 mois il y a | 0

| A accepté

Réponse apportée
Weird question about the editor...
The line you are talking about is referred to as the "right-hand text limit". You can adjust some properties for it under MATLAB...

5 mois il y a | 1

| A accepté

Réponse apportée
Error occurred in fitlm function.
@Walter Roberson surmised correctly, as usual. The fitlm function cannot be used when you have multiple dependent variables. Yo...

5 mois il y a | 0

Réponse apportée
how to convert table to cell to acess data?
The syntax rcs=M(:,4) will give a one-column table. The syntax rcs=M{:,4} will give a column of data of the class that is s...

5 mois il y a | 0

| A accepté

Charger plus