Can anyone spot my error?
Im trying to create a system that calculates interest over ten years but for some reason i keep getting an error message.
I am about 99% this is the correct text for the program yet there is an error message of: Error using ==> power
Matrix dimensions must agree.
So my t vector is not agreeing with my interest formula or what?
delete g114x05.txt; diary g0114x05.txt
clear; clc; close all; echo on
% Gilat 114/05
%Script determining account balance in a savings account
r=('Enter Interest Rate (as a percent) :')
P=('Enter Principal :')
fprintf('Time Amount \n')
fprintf('(yrs) ($) \n')
fprintf('%4i %8.2f \n',table')
echo off ;diary off;(Headbang)
not sure what language but
A is not defined with the same dimensions as t. Hence your error message, the power t appears to have 10 different values and A appears to only hold a single value. A needs to be same dimensions as t, or maybe loop through t and write each value to file as it is computed?